Skip to content

Commit

Permalink
Added support for facts whose types are not Prop but can be made defi…
Browse files Browse the repository at this point in the history
…nitionally equal to Prop with metavariable assignment
  • Loading branch information
JOSHCLUNE committed Nov 30, 2024
1 parent 4c83d7c commit 530b94e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Duper/Tactic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ def collectAssumptions (facts : Array Term) (withAllLCtx : Bool) (goalDecls : Ar
if ← isProp fact then
let fact ← preprocessFact (← instantiateMVars fact)
formulas := (fact, ← mkAppM ``eq_true #[proof], params, false, some factStx) :: formulas
else if ← isDefEq (← inferType fact) (.sort 0) then
/- This check can succeed where the previous failed in instances where `fact`'s type is
a sort with an undetermined universe level. We try the previous check first to avoid
unnecessarily assigning metavariables in `fact`'s type (which the above `isDefEq` check
can do)-/
let fact ← preprocessFact (← instantiateMVars fact)
formulas := (fact, ← mkAppM ``eq_true #[proof], params, false, some factStx) :: formulas
else if ← getIgnoreUnusableFactsM then
trace[duper.ignoredUnusableFacts] "Ignored {fact} ({factStx}) because it is not a Prop"
continue
Expand Down

0 comments on commit 530b94e

Please sign in to comment.