lean4-htt/tests/lean/run/1787.lean
Leonardo de Moura 5f38a483f2 fix: congr tactic
`MVarId.congr?` and `MVarId.hcongr?` should return `none` if an
exception is thrown while applying congruence theorem.

`MVarId.hcongr?` should try `eq_of_heq` before trying to apply
`hcongr` theorem.

closes #1787

BTW: Lean 4 `congr` tactic is applying `assumption`. Lean 3 version does not.
2022-10-28 08:00:04 -07:00

13 lines
418 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

open Function
def Set (α : Type u) := α → Prop
example {α : Type u}
(f : α → Type (max u v))
(U : α) (hU : f U = Set (Sigma f)) :
let g : Set (Sigma f) → Sigma f := fun (s : Set (Sigma f)) => ⟨U, cast hU.symm s⟩
∀ ⦃s t : Set (Sigma f)⦄,
g s = g t → cast hU (g s).snd = cast hU (g t).snd :=
by
intros g s t h
congr -- reduces to `(g s).snd = (g t).snd`, not `g s = g t`