lean4-htt/tests/lean/3140.lean
Arthur Adjedj a2ed4db562
fix: derive BEq on structure with Prop-fields (#3191)
Closes #3140

---------

Co-authored-by: Joachim Breitner <mail@joachim-breitner.de>
2024-01-18 02:32:51 +00:00

11 lines
315 B
Text

/- Verify that `deriving BEq` works on structures with `Prop`-fields.-/
structure S where
foo : Nat
p : True
Bar : Nat
deriving BEq
#eval (⟨1,⟨⟩,2⟩ : S) == ⟨1,⟨⟩,3⟩ -- false
#eval (⟨1,⟨⟩,2⟩ : S) == ⟨2,⟨⟩,2⟩ -- false
#eval (⟨1,⟨⟩,2⟩ : S) == ⟨1,⟨⟩,2⟩ -- true