ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: CategoryTheory.typesGrothendieckTopology_eq_canonical
File: Mathlib/CategoryTheory/Sites/Types.lean

Proof steps:
state_before: ⊢ typesGrothendieckTopology = Sheaf.canonicalTopology (Type u)
state_after: ⊢ typesGrothendieckTopology ∈ Sheaf.finestTopologySingle '' Set.range yoneda.obj
tactic: refine le_antisymm subcanonical_typesGrothendieckTopology (sInf_le ?_)
state_before: ⊢ typesGrothendieckTopology ∈ Sheaf.finestTopologySingle '' Set.range yoneda.obj
state_after: ⊢ (Sheaf.finestTopologySingle (yoneda.obj (ULift.{u, 0} Bool))).sieves = typesGrothendieckTopology.sieves
tactic: refine ⟨yoneda.obj (ULift Bool), ⟨_, rfl⟩, GrothendieckTopology.ext ?_⟩
state_before: ⊢ (Sheaf.finestTopologySingle (yoneda.obj (ULift.{u, 0} Bool))).sieves = typesGrothendieckTopology.sieves
state_after: case h
α : Type u
⊢ (Sheaf.finestTopologySingle (yoneda.obj (ULift.{u, 0} Bool))).sieves α = typesGrothendieckTopology.sieves α
tactic: funext α
state_before: case h
α : Type u
⊢ (Sheaf.finestTopologySingle (yoneda.obj (ULift.{u, 0} Bool))).sieves α = typesGrothendieckTopology.sieves α
state_after: case h.h
α : Type u
S : Sieve α
⊢ S ∈ (Sheaf.finestTopologySingle (yoneda.obj (ULift.{u, 0} Bool))).sieves α ↔ S ∈ typesGrothendieckTopology.sieves α
tactic: ext S
state_before: case h.h
α : Type u
S : Sieve α
⊢ S ∈ (Sheaf.finestTopologySingle (yoneda.obj (ULift.{u, 0} Bool))).sieves α ↔ S ∈ typesGrothendieckTopology.sieves α
state_after: case h.h
α : Type u
S : Sieve α
hs : S ∈ (Sheaf.finestTopologySingle (yoneda.obj (ULift.{u, 0} Bool))).sieves α
x : α
⊢ S.arrows fun x_1 => x
tactic: refine ⟨fun hs x => ?_, fun hs β f => isSheaf_yoneda' _ fun y => hs _⟩
state_before: case h.h
α : Type u
S : Sieve α
hs : S ∈ (Sheaf.finestTopologySingle (yoneda.obj (ULift.{u, 0} Bool))).sieves α
x : α
⊢ S.arrows fun x_1 => x
state_after: case h.h
α : Type u
S : Sieve α
hs : S ∈ (Sheaf.finestTopologySingle (yoneda.obj (ULift.{u, 0} Bool))).sieves α
x : α
hsx : ¬S.arrows fun x_1 => x
⊢ False
tactic: by_contra hsx
state_before: case h.h
α : Type u
S : Sieve α
hs : S ∈ (Sheaf.finestTopologySingle (yoneda.obj (ULift.{u, 0} Bool))).sieves α
x : α
hsx : ¬S.arrows fun x_1 => x
⊢ False
state_after: case h.h
α : Type u
S : Sieve α
hs : S ∈ (Sheaf.finestTopologySingle (yoneda.obj (ULift.{u, 0} Bool))).sieves α
x : α
hsx : ¬S.arrows fun x_1 => x
this : (fun x => { down := true }) = fun x => { down := false }
⊢ False
tactic: have : (fun _ => ULift.up true) = fun _ => ULift.up false :=
    (hs PUnit fun _ => x).isSeparatedFor.ext
      fun β f hf => funext fun y => hsx.elim <| S.2 hf fun _ => y
state_before: case h.h
α : Type u
S : Sieve α
hs : S ∈ (Sheaf.finestTopologySingle (yoneda.obj (ULift.{u, 0} Bool))).sieves α
x : α
hsx : ¬S.arrows fun x_1 => x
this : (fun x => { down := true }) = fun x => { down := false }
⊢ False
state_after: no goals
tactic: simp [Function.funext_iff] at this
Theorem: CochainComplex.HomComplex.Cochain.comp_units_smul
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean

Proof steps:
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m n₁ n₂ n₁₂ : ℤ
z₁ : Cochain F G n₁
k : Rˣ
z₂ : Cochain G K n₂
h : n₁ + n₂ = n₁₂
⊢ z₁.comp (k • z₂) h = k • z₁.comp z₂ h
state_after: no goals
tactic: apply Cochain.comp_smul
Theorem: MeasureTheory.Measure.map_add
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ✝ μ₁ μ₂ μ₃ ν✝ ν' ν₁ ν₂ : Measure α
s s' t : Set α
μ ν : Measure α
f : α → β
hf : Measurable f
⊢ map f (μ + ν) = map f μ + map f ν
state_after: no goals
tactic: simp [← mapₗ_apply_of_measurable hf]
Theorem: ZMod.toAddCircle_natCast
File: Mathlib/Topology/Instances/AddCircle.lean

Proof steps:
state_before: 𝕜 : Type u_1
B : Type u_2
N : ℕ
inst✝ : NeZero N
j : ℕ
⊢ toAddCircle ↑j = ↑(↑j / ↑N)
state_after: no goals
tactic: simpa using toAddCircle_intCast (N := N) j
Theorem: Commute.of_orderOf_dvd_two
File: Mathlib/GroupTheory/Exponent.lean

Proof steps:
state_before: G : Type u
inst✝¹ : Monoid G
inst✝ : IsCancelMul G
h : ∀ (g : G), orderOf g ∣ 2
a b : G
⊢ Commute a b
state_after: G : Type u
inst✝¹ : Monoid G
inst✝ : IsCancelMul G
a b : G
h : ∀ (g : G), g ^ 2 = 1
⊢ Commute a b
tactic: simp_rw [orderOf_dvd_iff_pow_eq_one] at h
state_before: G : Type u
inst✝¹ : Monoid G
inst✝ : IsCancelMul G
a b : G
h : ∀ (g : G), g ^ 2 = 1
⊢ Commute a b
state_after: G : Type u
inst✝¹ : Monoid G
inst✝ : IsCancelMul G
a b : G
h : ∀ (g : G), g ^ 2 = 1
⊢ a * (a * b) * b = a * (b * a) * b
tactic: rw [commute_iff_eq, ← mul_right_inj a, ← mul_left_inj b]
state_before: G : Type u
inst✝¹ : Monoid G
inst✝ : IsCancelMul G
a b : G
h : ∀ (g : G), g ^ 2 = 1
⊢ a * (a * b) * b = a * (b * a) * b
state_after: no goals
tactic: calc
    a * (a * b) * b = a ^ 2 * b ^ 2 := by simp only [pow_two]; group
    _ = 1 := by rw [h, h, mul_one]
    _ = (a * b) ^ 2 := by rw [h]
    _ = a * (b * a) * b := by simp only [pow_two]; group
Theorem: Basis.le_span''
File: Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean

Proof steps:
state_before: R : Type u
M : Type v
inst✝⁵ : Ring R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
ι✝ : Type w
ι' : Type w'
inst✝² : RankCondition R
ι : Type u_1
inst✝¹ : Fintype ι
b : Basis ι R M
w : Set M
inst✝ : Fintype ↑w
s : span R w = ⊤
⊢ Fintype.card ι ≤ Fintype.card ↑w
state_after: case f
R : Type u
M : Type v
inst✝⁵ : Ring R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
ι✝ : Type w
ι' : Type w'
inst✝² : RankCondition R
ι : Type u_1
inst✝¹ : Fintype ι
b : Basis ι R M
w : Set M
inst✝ : Fintype ↑w
s : span R w = ⊤
⊢ (↑w →₀ R) →ₗ[R] ι →₀ R

case i
R : Type u
M : Type v
inst✝⁵ : Ring R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
ι✝ : Type w
ι' : Type w'
inst✝² : RankCondition R
ι : Type u_1
inst✝¹ : Fintype ι
b : Basis ι R M
w : Set M
inst✝ : Fintype ↑w
s : span R w = ⊤
⊢ Surjective ⇑?f
tactic: fapply card_le_of_surjective' R
Theorem: Finset.nnnorm_prod_le'
File: Mathlib/Analysis/Normed/Field/Basic.lean

Proof steps:
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : SeminormedRing α✝
α : Type u_5
inst✝ : NormedCommRing α
s : Finset ι
hs : s.Nonempty
f : ι → α
⊢ ∏ i ∈ s, ‖f i‖ = (fun a => ↑a) (∏ i ∈ s, ‖f i‖₊)
state_after: no goals
tactic: simp [NNReal.coe_prod]
Theorem: Set.intersecting_iff_eq_empty_of_subsingleton
File: Mathlib/Combinatorics/SetFamily/Intersecting.lean

Proof steps:
state_before: α : Type u_1
inst✝² : SemilatticeInf α
inst✝¹ : OrderBot α
s✝ t : Set α
a b c : α
inst✝ : Subsingleton α
s : Set α
⊢ s.Intersecting ↔ s = ∅
state_after: case refine_1
α : Type u_1
inst✝² : SemilatticeInf α
inst✝¹ : OrderBot α
s✝ t : Set α
a b c : α
inst✝ : Subsingleton α
s : Set α
h : ¬s = ∅
⊢ ⊥ ∈ s

case refine_2
α : Type u_1
inst✝² : SemilatticeInf α
inst✝¹ : OrderBot α
s✝ t : Set α
a b c : α
inst✝ : Subsingleton α
s : Set α
⊢ s = ∅ → s ≠ {⊥}
tactic: refine
    subsingleton_of_subsingleton.intersecting.trans
      ⟨not_imp_comm.2 fun h => subsingleton_of_subsingleton.eq_singleton_of_mem ?_, ?_⟩
Theorem: CategoryTheory.LocalizerMorphism.homMap_comp
File: Mathlib/CategoryTheory/Localization/HomEquiv.lean

Proof steps:
state_before: C : Type u_1
C₁ : Type u_2
C₂ : Type u_3
C₃ : Type u_4
D₁ : Type u_5
D₂ : Type u_6
D₃ : Type u_7
inst✝⁹ : Category.{?u.9675, u_1} C
inst✝⁸ : Category.{u_9, u_2} C₁
inst✝⁷ : Category.{u_11, u_3} C₂
inst✝⁶ : Category.{?u.9687, u_4} C₃
inst✝⁵ : Category.{u_8, u_5} D₁
inst✝⁴ : Category.{u_10, u_6} D₂
inst✝³ : Category.{?u.9699, u_7} D₃
W₁ : MorphismProperty C₁
W₂ : MorphismProperty C₂
W₃ : MorphismProperty C₃
Φ : LocalizerMorphism W₁ W₂
Ψ : LocalizerMorphism W₂ W₃
L₁ : C₁ ⥤ D₁
inst✝² : L₁.IsLocalization W₁
L₂ : C₂ ⥤ D₂
inst✝¹ : L₂.IsLocalization W₂
L₃ : C₃ ⥤ D₃
inst✝ : L₃.IsLocalization W₃
X Y Z : C₁
f : L₁.obj X ⟶ L₁.obj Y
g : L₁.obj Y ⟶ L₁.obj Z
⊢ Φ.homMap L₁ L₂ (f ≫ g) = Φ.homMap L₁ L₂ f ≫ Φ.homMap L₁ L₂ g
state_after: no goals
tactic: simp [homMap]
Theorem: dvd_antisymm
File: Mathlib/Algebra/GroupWithZero/Divisibility.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
a b : α
m n : ℕ
inst✝ : Subsingleton αˣ
⊢ a ∣ b → b ∣ a → a = b
state_after: case intro.intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
a : α
m n : ℕ
inst✝ : Subsingleton αˣ
c d : α
hcd : a = a * c * d
⊢ a = a * c
tactic: rintro ⟨c, rfl⟩ ⟨d, hcd⟩
state_before: case intro.intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
a : α
m n : ℕ
inst✝ : Subsingleton αˣ
c d : α
hcd : a = a * c * d
⊢ a = a * c
state_after: case intro.intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
a : α
m n : ℕ
inst✝ : Subsingleton αˣ
c d : α
hcd : c = 1 ∧ d = 1 ∨ a = 0
⊢ a = a * c
tactic: rw [mul_assoc, eq_comm, mul_right_eq_self₀, mul_eq_one] at hcd
state_before: case intro.intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
a : α
m n : ℕ
inst✝ : Subsingleton αˣ
c d : α
hcd : c = 1 ∧ d = 1 ∨ a = 0
⊢ a = a * c
state_after: no goals
tactic: obtain ⟨rfl, -⟩ | rfl := hcd <;> simp
Theorem: pow_le_one_iff_of_nonneg
File: Mathlib/Algebra/Order/Ring/Basic.lean

Proof steps:
state_before: α : Type u_1
M : Type u_2
R : Type u_3
inst✝ : LinearOrderedSemiring R
a b : R
m n : ℕ
ha : 0 ≤ a
hn : n ≠ 0
⊢ a ^ n ≤ 1 ↔ a ≤ 1
state_after: no goals
tactic: simpa only [one_pow] using pow_le_pow_iff_left ha zero_le_one hn
Theorem: Finset.addETransformLeft.card
File: Mathlib/Combinatorics/Additive/ETransform.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Group α
e : α
x : Finset α × Finset α
⊢ x.1.card + (op e • x.1).card = 2 * x.1.card
state_after: no goals
tactic: rw [card_smul_finset, two_mul]
Theorem: Multiset.mem_antidiagonal
File: Mathlib/Data/Multiset/Antidiagonal.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
s : Multiset α
x : Multiset α × Multiset α
l : List α
⊢ x ∈ antidiagonal ⟦l⟧ ↔ x.1 + x.2 = ⟦l⟧
state_after: α : Type u_1
β : Type u_2
s : Multiset α
x : Multiset α × Multiset α
l : List α
⊢ x ∈ ↑(powersetAux l).revzip ↔ x.1 + x.2 = ↑l
tactic: dsimp only [quot_mk_to_coe, antidiagonal_coe]
state_before: α : Type u_1
β : Type u_2
s : Multiset α
x : Multiset α × Multiset α
l : List α
⊢ x ∈ ↑(powersetAux l).revzip ↔ x.1 + x.2 = ↑l
state_after: α : Type u_1
β : Type u_2
s : Multiset α
x : Multiset α × Multiset α
l : List α
h : x.1 + x.2 = ↑l
⊢ x ∈ ↑(powersetAux l).revzip
tactic: refine ⟨fun h => revzip_powersetAux h, fun h ↦ ?_⟩
state_before: α : Type u_1
β : Type u_2
s : Multiset α
x : Multiset α × Multiset α
l : List α
h : x.1 + x.2 = ↑l
⊢ x ∈ ↑(powersetAux l).revzip
state_after: α : Type u_1
β : Type u_2
s : Multiset α
x : Multiset α × Multiset α
l : List α
h : x.1 + x.2 = ↑l
this : DecidableEq α
⊢ x ∈ ↑(powersetAux l).revzip
tactic: haveI := Classical.decEq α
state_before: α : Type u_1
β : Type u_2
s : Multiset α
x : Multiset α × Multiset α
l : List α
h : x.1 + x.2 = ↑l
this : DecidableEq α
⊢ x ∈ ↑(powersetAux l).revzip
state_after: α : Type u_1
β : Type u_2
s : Multiset α
x : Multiset α × Multiset α
l : List α
h : x.1 + x.2 = ↑l
this : DecidableEq α
⊢ ∃ a ≤ x.1 + x.2, (a, x.1 + x.2 - a) = x
tactic: simp only [revzip_powersetAux_lemma l revzip_powersetAux, h.symm, mem_coe,
      List.mem_map, mem_powersetAux]
state_before: α : Type u_1
β : Type u_2
s : Multiset α
x : Multiset α × Multiset α
l : List α
h : x.1 + x.2 = ↑l
this : DecidableEq α
⊢ ∃ a ≤ x.1 + x.2, (a, x.1 + x.2 - a) = x
state_after: case mk
α : Type u_1
β : Type u_2
s : Multiset α
l : List α
this : DecidableEq α
x₁ x₂ : Multiset α
h : (x₁, x₂).1 + (x₁, x₂).2 = ↑l
⊢ ∃ a ≤ (x₁, x₂).1 + (x₁, x₂).2, (a, (x₁, x₂).1 + (x₁, x₂).2 - a) = (x₁, x₂)
tactic: cases' x with x₁ x₂
state_before: case mk
α : Type u_1
β : Type u_2
s : Multiset α
l : List α
this : DecidableEq α
x₁ x₂ : Multiset α
h : (x₁, x₂).1 + (x₁, x₂).2 = ↑l
⊢ ∃ a ≤ (x₁, x₂).1 + (x₁, x₂).2, (a, (x₁, x₂).1 + (x₁, x₂).2 - a) = (x₁, x₂)
state_after: no goals
tactic: exact ⟨x₁, le_add_right _ _, by rw [add_tsub_cancel_left x₁ x₂]⟩
Theorem: Stream'.tail_inits
File: Mathlib/Data/Stream/Init.lean

Proof steps:
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ s.inits.tail = initsCore [s.head, s.tail.head] s.tail.tail
state_after: α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ (initsCore [s.head] s.tail).tail = initsCore [s.head, s.tail.head] s.tail.tail
tactic: unfold inits
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ (initsCore [s.head] s.tail).tail = initsCore [s.head, s.tail.head] s.tail.tail
state_after: α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ ([s.head] :: initsCore ([s.head] ++ [s.tail.head]) s.tail.tail).tail = initsCore [s.head, s.tail.head] s.tail.tail
tactic: rw [inits_core_eq]
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ ([s.head] :: initsCore ([s.head] ++ [s.tail.head]) s.tail.tail).tail = initsCore [s.head, s.tail.head] s.tail.tail
state_after: no goals
tactic: rfl
Theorem: Finsupp.equivMapDomain_trans
File: Mathlib/Data/Finsupp/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
f : α ≃ β
g : β ≃ γ
l : α →₀ M
⊢ equivMapDomain (f.trans g) l = equivMapDomain g (equivMapDomain f l)
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
f : α ≃ β
g : β ≃ γ
l : α →₀ M
x : γ
⊢ (equivMapDomain (f.trans g) l) x = (equivMapDomain g (equivMapDomain f l)) x
tactic: ext x
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
f : α ≃ β
g : β ≃ γ
l : α →₀ M
x : γ
⊢ (equivMapDomain (f.trans g) l) x = (equivMapDomain g (equivMapDomain f l)) x
state_after: no goals
tactic: rfl
Theorem: CliffordAlgebra.GradedAlgebra.lift_ι_eq
File: Mathlib/LinearAlgebra/CliffordAlgebra/Grading.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i' : ZMod 2
x' : ↥(evenOdd Q i')
⊢ M →ₗ[R] ⨁ (i : ZMod 2), ↥(evenOdd Q i)
state_after: no goals
tactic: apply GradedAlgebra.ι Q
state_before: R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i' : ZMod 2
x' : ↥(evenOdd Q i')
⊢ ∀ (m : M), (GradedAlgebra.ι Q) m * (GradedAlgebra.ι Q) m = (algebraMap R (⨁ (i : ZMod 2), ↥(evenOdd Q i))) (Q m)
state_after: no goals
tactic: apply GradedAlgebra.ι_sq_scalar Q
state_before: R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i' : ZMod 2
x' : ↥(evenOdd Q i')
⊢ ((lift Q) ⟨GradedAlgebra.ι Q, ⋯⟩) ↑x' = (DirectSum.of (fun i => ↥(evenOdd Q i)) i') x'
state_after: case mk
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i' : ZMod 2
x' : CliffordAlgebra Q
hx' : x' ∈ evenOdd Q i'
⊢ ((lift Q) ⟨GradedAlgebra.ι Q, ⋯⟩) ↑⟨x', hx'⟩ = (DirectSum.of (fun i => ↥(evenOdd Q i)) i') ⟨x', hx'⟩
tactic: cases' x' with x' hx'
state_before: case mk
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i' : ZMod 2
x' : CliffordAlgebra Q
hx' : x' ∈ evenOdd Q i'
⊢ ((lift Q) ⟨GradedAlgebra.ι Q, ⋯⟩) ↑⟨x', hx'⟩ = (DirectSum.of (fun i => ↥(evenOdd Q i)) i') ⟨x', hx'⟩
state_after: case mk
R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
Q : QuadraticForm R M
i' : ZMod 2
x' : CliffordAlgebra Q
hx' : x' ∈ evenOdd Q i'
⊢ ((lift Q) ⟨GradedAlgebra.ι Q, ⋯⟩) x' = (DirectSum.of (fun i => ↥(evenOdd Q i)) i') ⟨x', hx'⟩
tactic: dsimp only [Subtype.coe_mk, DirectSum.lof_eq_of]
Theorem: List.get?_modifyNth_eq
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

Proof steps:
state_before: α : Type u_1
f : α → α
n : Nat
l : List α
⊢ (modifyNth f n l).get? n = f <$> l.get? n
state_after: no goals
tactic: simp [getElem?_modifyNth_eq]
Theorem: Configuration.ProjectivePlane.pointCount_eq_pointCount
File: Mathlib/Combinatorics/Configuration.lean

Proof steps:
state_before: P : Type u_1
L : Type u_2
inst✝³ : Membership P L
inst✝² : ProjectivePlane P L
inst✝¹ : Finite P
inst✝ : Finite L
l m : L
⊢ pointCount P l = pointCount P m
state_after: no goals
tactic: apply lineCount_eq_lineCount (Dual P)
Theorem: Projectivization.Subspace.span_sup
File: Mathlib/LinearAlgebra/Projectivization/Subspace.lean

Proof steps:
state_before: K : Type u_1
V : Type u_2
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
S : Set (ℙ K V)
W : Subspace K V
⊢ span S ⊔ W = span (S ∪ ↑W)
state_after: no goals
tactic: rw [span_union, span_coe]
Theorem: Int.zero_le_ofNat
File: Mathlib/Data/Int/Defs.lean

Proof steps:
state_before: a b c d m n✝ : ℤ
n : ℕ
⊢ 0 + ↑n = ofNat n
state_after: a b c d m n✝ : ℤ
n : ℕ
⊢ ↑n = ofNat n
tactic: rw [Int.zero_add]
state_before: a b c d m n✝ : ℤ
n : ℕ
⊢ ↑n = ofNat n
state_after: no goals
tactic: rfl
Theorem: Finset.ruzsa_triangle_inequality_div_div_div
File: Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ (A / C).card * B.card ≤ (A / B).card * (B / C).card
state_after: α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ (A / C).card * B.card ≤ ((A / B) ×ˢ (B / C)).card * 1
tactic: rw [← card_product (A / B), ← mul_one ((A / B) ×ˢ (B / C)).card]
state_before: α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
⊢ (A / C).card * B.card ≤ ((A / B) ×ˢ (B / C)).card * 1
state_after: case refine_1
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
x : α
hx : x ∈ A / C
⊢ B.card ≤ (bipartiteAbove (fun b ac => ac.1 * ac.2 = b) ((A / B) ×ˢ (B / C)) x).card

case refine_2
α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A✝ B✝ C✝ A B C : Finset α
x : α × α
x✝ : x ∈ (A / B) ×ˢ (B / C)
a✝ b✝ : α
hu : a✝ ∈ bipartiteBelow (fun b ac => ac.1 * ac.2 = b) (A / C) x
hv : b✝ ∈ bipartiteBelow (fun b ac => ac.1 * ac.2 = b) (A / C) x
⊢ x.1 * x.2 = b✝
tactic: refine card_mul_le_card_mul (fun b ac ↦ ac.1 * ac.2 = b) (fun x hx ↦ ?_)
    fun x _ ↦ card_le_one_iff.2 fun hu hv ↦
      ((mem_bipartiteBelow _).1 hu).2.symm.trans ?_
Theorem: PredOrder.limitRecOn_limit
File: Mathlib/Order/SuccPred/Limit.lean

Proof steps:
state_before: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : PredOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedGT α
H_pred : (a : α) → ¬IsMin a → C a → C (pred a)
H_lim : (a : α) → IsPredLimit a → ((b : α) → b > a → C b) → C a
ha : IsPredLimit a
⊢ PredOrder.limitRecOn a H_pred H_lim = H_lim a ha fun x x_1 => PredOrder.limitRecOn x H_pred H_lim
state_after: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : PredOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedGT α
H_pred : (a : α) → ¬IsMin a → C a → C (pred a)
H_lim : (a : α) → IsPredLimit a → ((b : α) → b > a → C b) → C a
ha : IsPredLimit a
⊢ (H_lim a ha fun y x =>
      ⋯.fix
        (fun a IH =>
          if h : IsPredLimit a then H_lim a h IH
          else
            let x := Classical.indefiniteDescription (fun x => ¬IsMin x ∧ pred x = a) ⋯;
            ⋯ ▸ H_pred ↑x ⋯ (IH ↑x ⋯))
        y) =
    H_lim a ha fun x x_1 => PredOrder.limitRecOn x H_pred H_lim
tactic: rw [PredOrder.limitRecOn, WellFounded.fix_eq, dif_pos ha]
state_before: α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : PredOrder α
a b : α
C : α → Sort u_2
inst✝ : WellFoundedGT α
H_pred : (a : α) → ¬IsMin a → C a → C (pred a)
H_lim : (a : α) → IsPredLimit a → ((b : α) → b > a → C b) → C a
ha : IsPredLimit a
⊢ (H_lim a ha fun y x =>
      ⋯.fix
        (fun a IH =>
          if h : IsPredLimit a then H_lim a h IH
          else
            let x := Classical.indefiniteDescription (fun x => ¬IsMin x ∧ pred x = a) ⋯;
            ⋯ ▸ H_pred ↑x ⋯ (IH ↑x ⋯))
        y) =
    H_lim a ha fun x x_1 => PredOrder.limitRecOn x H_pred H_lim
state_after: no goals
tactic: rfl
Theorem: EMetric.edist_le_infEdist_add_ediam
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

Proof steps:
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t : Set α
Φ : α → β
hy : y ∈ s
⊢ edist x y ≤ infEdist x s + diam s
state_after: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t : Set α
Φ : α → β
hy : y ∈ s
⊢ edist x y ≤ ⨅ i ∈ s, edist x i + diam s
tactic: simp_rw [infEdist, ENNReal.iInf_add]
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t : Set α
Φ : α → β
hy : y ∈ s
⊢ edist x y ≤ ⨅ i ∈ s, edist x i + diam s
state_after: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t : Set α
Φ : α → β
hy : y ∈ s
i : α
hi : i ∈ s
⊢ edist x y ≤ edist x i + diam s
tactic: refine le_iInf₂ fun i hi => ?_
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t : Set α
Φ : α → β
hy : y ∈ s
i : α
hi : i ∈ s
⊢ edist x y ≤ edist x i + diam s
state_after: no goals
tactic: calc
    edist x y ≤ edist x i + edist i y := edist_triangle _ _ _
    _ ≤ edist x i + diam s := add_le_add le_rfl (edist_le_diam_of_mem hi hy)
Theorem: Dilation.nndist_eq
File: Mathlib/Topology/MetricSpace/Dilation.lean

Proof steps:
state_before: α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
F✝ : Type u_4
G : Type u_5
inst✝⁶ : PseudoEMetricSpace α✝
inst✝⁵ : PseudoEMetricSpace β✝
inst✝⁴ : FunLike F✝ α✝ β✝
α : Type u_6
β : Type u_7
F : Type u_8
inst✝³ : PseudoMetricSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : FunLike F α β
inst✝ : DilationClass F α β
f : F
x y : α
⊢ nndist (f x) (f y) = ratio f * nndist x y
state_after: no goals
tactic: simp only [← ENNReal.coe_inj, ← edist_nndist, ENNReal.coe_mul, edist_eq]
Theorem: CategoryTheory.ShortComplex.RightHomologyData.ofEpiOfIsIsoOfMono_p
File: Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean

Proof steps:
state_before: C : Type u_1
inst✝⁴ : Category.{u_2, u_1} C
inst✝³ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
φ : S₁ ⟶ S₂
h : S₁.RightHomologyData
inst✝² : Epi φ.τ₁
inst✝¹ : IsIso φ.τ₂
inst✝ : Mono φ.τ₃
⊢ (ofEpiOfIsIsoOfMono φ h).p = inv φ.τ₂ ≫ h.p
state_after: no goals
tactic: simp [ofEpiOfIsIsoOfMono, opMap]
Theorem: Fin.list_reverse
File: .lake/packages/batteries/Batteries/Data/Fin/Lemmas.lean

Proof steps:
state_before: n : Nat
⊢ (list n).reverse = List.map rev (list n)
state_after: no goals
tactic: induction n with
  | zero => rfl
  | succ n ih =>
    conv => lhs; rw [list_succ_last]
    conv => rhs; rw [list_succ]
    simp [← List.map_reverse, ih, Function.comp_def, rev_succ]
Theorem: Finsupp.toMultiset_strictMono
File: Mathlib/Data/Finsupp/Multiset.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
⊢ StrictMono ⇑toMultiset
state_after: no goals
tactic: classical exact (@orderIsoMultiset ι _).strictMono
Theorem: map_mem_closure₂
File: Mathlib/Topology/Constructions.lean

Proof steps:
state_before: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : TopologicalSpace W
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
f : X → Y → Z
x : X
y : Y
s : Set X
t : Set Y
u : Set Z
hf : Continuous (uncurry f)
hx : x ∈ closure s
hy : y ∈ closure t
h : ∀ a ∈ s, ∀ b ∈ t, f a b ∈ u
⊢ (x, y) ∈ closure (s ×ˢ t)
state_after: no goals
tactic: simpa only [closure_prod_eq] using mk_mem_prod hx hy
Theorem: Finpartition.energy_nonneg
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Energy.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : DecidableEq α
s : Finset α
P : Finpartition s
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
⊢ 0 ≤ P.energy G
state_after: no goals
tactic: exact div_nonneg (Finset.sum_nonneg fun _ _ => sq_nonneg _) <| sq_nonneg _