feat: add [ext] attribute to Array.ext (#4970)

This fixes a minor papercut.
This commit is contained in:
David Thrane Christiansen 2024-08-09 14:40:39 +02:00 committed by GitHub
parent 5da9038fb4
commit 30a52b794a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -78,7 +78,7 @@ end Elab.Tactic.Ext
end Lean
attribute [ext] Prod PProd Sigma PSigma
attribute [ext] funext propext Subtype.eq
attribute [ext] funext propext Subtype.eq Array.ext
@[ext] protected theorem PUnit.ext (x y : PUnit) : x = y := rfl
protected theorem Unit.ext (x y : Unit) : x = y := rfl

View file

@ -82,6 +82,11 @@ example (f : × ()) : f = f := by
example (f : Empty → Empty) : f = f := by
ext ⟨⟩
example (xs : Array α) : xs.map id = xs := by
ext
. simp
. simp
@[ext (iff := false)] theorem ext_intros {n m : Nat} (w : ∀ n m : Nat, n = m) : n = m := by apply w
#guard_msgs (drop warning) in