File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
src/Lean/Elab/PreDefinition Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -333,7 +333,7 @@ def tryContradiction (mvarId : MVarId) : MetaM Bool := do
333
333
partial def mkUnfoldProof (declName : Name) (mvarId : MVarId) : MetaM Unit := do
334
334
let some eqs ← getEqnsFor? declName | throwError "failed to generate equations for '{declName}'"
335
335
let tryEqns (mvarId : MVarId) : MetaM Bool :=
336
- eqs.anyM fun eq => commitWhen do
336
+ eqs.anyM fun eq => commitWhen do checkpointDefEq (mayPostpone := false ) do
337
337
try
338
338
let subgoals ← mvarId.apply (← mkConstWithFreshMVarLevels eq)
339
339
subgoals.allM fun subgoal => do
Original file line number Diff line number Diff line change
1
+ def iscoh_wmap {A:Type _}{B:Type _} : (A -> B) -> Type _ :=
2
+ fun f => @Subtype (B -> A) fun r => ∀ a , a = r (f a)
3
+ def wmap : Type _ -> Type _ -> Type _ :=
4
+ fun A B => @Sigma (A -> B) fun f => iscoh_wmap f
5
+
6
+ def hgroup : Nat -> Type _ -> Type _
7
+ | .zero , T => wmap T T
8
+ | .succ a, T => wmap (hgroup a T) (hgroup a T)
9
+
10
+ example : hgroup 0 Unit := by
11
+ unfold hgroup
12
+ admit
13
+
14
+ -- TODO: we should improve univere inference. It should be
15
+ -- hgroup.{u} : Nat → Type u → Type u
16
+ /--
17
+ info: hgroup.{u_1, u_2} : Nat → Type (max u_1 u_2) → Type (max u_1 u_2)
18
+ -/
19
+ #guard_msgs in
20
+ #check hgroup
You can’t perform that action at this time.
0 commit comments