Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive 1 <= Max a b when (1 <= a ) or (1 <= b) #41

Open
lmbollen opened this issue May 24, 2022 · 1 comment
Open

Derive 1 <= Max a b when (1 <= a ) or (1 <= b) #41

lmbollen opened this issue May 24, 2022 · 1 comment

Comments

@lmbollen
Copy link

I'm not sure of this is possible, but it's trival that 1 < = Max a b holds when 1 <= a holds or 1 <= b holds.
However, the plugin can't deduce this.

@rowanG077
Copy link
Member

rowanG077 commented May 24, 2022

Yes and unfortunately it's not super easy to add. Most reasoning this plugin does is local only. So stuff like using other constraints to solve constraints isn't done.

So instead I solve constraints like this using basic axioms:

maxAxiomL
  :: forall (n :: Nat) (p :: Nat) (q :: Nat)
   . (n <= p) :- (n <= Max p q)
maxAxiomL = Sub (unsafeCoerce (Dict :: Dict (a ~ a)))

and a similar one can be defined for the other case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants