parent
dda1fd27c4
commit
cbe9adbe9e
2 changed files with 17 additions and 1 deletions
|
|
@ -145,7 +145,7 @@ def rewriteUnnormalized (mvarId : MVarId) : MetaM Unit := do
|
|||
congrTheorems := (← getSimpCongrTheorems)
|
||||
config := Simp.neutralConfig
|
||||
}
|
||||
let tgt ← mvarId.getType
|
||||
let tgt ← instantiateMVars (← mvarId.getType)
|
||||
let res ← Simp.main tgt simpCtx (methods := { post })
|
||||
let newGoal ← applySimpResultToTarget mvarId tgt res
|
||||
newGoal.refl
|
||||
|
|
|
|||
16
tests/lean/run/1202.lean
Normal file
16
tests/lean/run/1202.lean
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
opaque f : Bool → Bool → Bool
|
||||
axiom f_comm (a b : Bool) : f a b = f b a
|
||||
axiom f_assoc (a b c : Bool) : f (f a b) c = f a (f b c)
|
||||
instance : Lean.IsCommutative f := ⟨f_comm⟩
|
||||
instance : Lean.IsAssociative f := ⟨f_assoc⟩
|
||||
|
||||
example (a b c : Bool) : f (f a b) c = f (f a c) b :=
|
||||
by ac_rfl -- good
|
||||
|
||||
example (a b c : Bool) : (f (f a b) c = f (f a c) b) ∧ true :=
|
||||
And.intro (by ac_rfl) rfl -- good
|
||||
|
||||
example (a b c : Bool) : (f (f a b) c = f (f a c) b) ∧ true := by
|
||||
apply And.intro
|
||||
. ac_rfl
|
||||
. rfl
|
||||
Loading…
Add table
Reference in a new issue