lean4-htt/tests/lean/1870.lean
2024-09-10 19:30:09 +10:00

23 lines
639 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.

class One (α : Type u) where
one : α
instance One.toOfNat1 {α} [One α] : OfNat α (nat_lit 1) where
ofNat := One α.1
instance One.ofOfNat1 {α} [OfNat α (nat_lit 1)] : One α where
one := 1
set_option pp.mvars false in
theorem ex1 : (@OfNat.ofNat Nat 0 Zero.toOfNat0) = @OfNat.ofNat Nat 1 One.toOfNat1 := by
refine congrArg _ (congrArg _ ?_)
rfl
example : (@OfNat.ofNat Nat 0 Zero.toOfNat0) = @OfNat.ofNat Nat 1 One.toOfNat1 := by
apply congrArg
apply congrArg
apply rfl
theorem ex2 : (@OfNat.ofNat Nat 0 Zero.toOfNat0) = @OfNat.ofNat Nat 1 One.toOfNat1 := by
apply congrArg
apply congrArg
apply rfl