1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: cast_eq_iff_heq
File: .lake/packages/batteries/Batteries/Logic.lean

tactic: cases h
state_before: a✝¹ a✝ : Sort u_1
e : a✝¹ = a✝
a : a✝¹
a' : a✝
h : HEq a a'
⊢ cast e a = a'
state_after: case refl
a✝ : Sort u_1
a : a✝
e : a✝ = a✝
⊢ cast e a = a

tactic: rfl
state_before: case refl
a✝ : Sort u_1
a : a✝
e : a✝ = a✝
⊢ cast e a = a
state_after: no goals
Theorem: Surreal.Multiplication.ih1_neg_left
File: Mathlib/SetTheory/Surreal/Multiplication.lean

tactic: rw [isOption_neg] at h₁ h₂
state_before: x x₁✝ x₂✝ x₃ x' y y₁ y₂ y₃ y'✝ : PGame
h : IH1 x y
x₁ x₂ y' : PGame
h₁ : x₁.IsOption (-x)
h₂ : x₂.IsOption (-x)
hy : y' = y ∨ y'.IsOption y
⊢ P24 x₁ x₂ y'
state_after: x x₁✝ x₂✝ x₃ x' y y₁ y₂ y₃ y'✝ : PGame
h : IH1 x y
x₁ x₂ y' : PGame
h₁ : (-x₁).IsOption x
h₂ : (-x₂).IsOption x
hy : y' = y ∨ y'.IsOption y
⊢ P24 x₁ x₂ y'

tactic: exact P24_neg_left.2 (h h₂ h₁ hy)
state_before: x x₁✝ x₂✝ x₃ x' y y₁ y₂ y₃ y'✝ : PGame
h : IH1 x y
x₁ x₂ y' : PGame
h₁ : (-x₁).IsOption x
h₂ : (-x₂).IsOption x
hy : y' = y ∨ y'.IsOption y
⊢ P24 x₁ x₂ y'
state_after: no goals
Theorem: Monoid.exponent_eq_max'_orderOf
File: Mathlib/GroupTheory/Exponent.lean

tactic: simp
state_before: G : Type u
inst✝¹ : CancelCommMonoid G
inst✝ : Fintype G
⊢ 1 ∈ Finset.image orderOf Finset.univ
state_after: no goals

tactic: rw [← Finset.Nonempty.csSup_eq_max', Finset.coe_image, Finset.coe_univ, Set.image_univ, ← iSup]
state_before: G : Type u
inst✝¹ : CancelCommMonoid G
inst✝ : Fintype G
⊢ exponent G = (Finset.image orderOf Finset.univ).max' ⋯
state_after: G : Type u
inst✝¹ : CancelCommMonoid G
inst✝ : Fintype G
⊢ exponent G = iSup orderOf

tactic: exact exponent_eq_iSup_orderOf orderOf_pos
state_before: G : Type u
inst✝¹ : CancelCommMonoid G
inst✝ : Fintype G
⊢ exponent G = iSup orderOf
state_after: no goals
Theorem: Fin.succAbove_predAbove
File: Mathlib/Data/Fin/Basic.lean

tactic: obtain h | h := Fin.lt_or_lt_of_ne h
state_before: n m : ℕ
p : Fin n
i : Fin (n + 1)
h : i ≠ p.castSucc
⊢ p.castSucc.succAbove (p.predAbove i) = i
state_after: case inl
n m : ℕ
p : Fin n
i : Fin (n + 1)
h✝ : i ≠ p.castSucc
h : i < p.castSucc
⊢ p.castSucc.succAbove (p.predAbove i) = i

case inr
n m : ℕ
p : Fin n
i : Fin (n + 1)
h✝ : i ≠ p.castSucc
h : p.castSucc < i
⊢ p.castSucc.succAbove (p.predAbove i) = i

tactic: rw [predAbove_of_le_castSucc _ _ (Fin.le_of_lt h), succAbove_castPred_of_lt _ _ h]
state_before: case inl
n m : ℕ
p : Fin n
i : Fin (n + 1)
h✝ : i ≠ p.castSucc
h : i < p.castSucc
⊢ p.castSucc.succAbove (p.predAbove i) = i
state_after: no goals

tactic: rw [predAbove_of_castSucc_lt _ _ h, succAbove_pred_of_lt _ _ h]
state_before: case inr
n m : ℕ
p : Fin n
i : Fin (n + 1)
h✝ : i ≠ p.castSucc
h : p.castSucc < i
⊢ p.castSucc.succAbove (p.predAbove i) = i
state_after: no goals
Theorem: Nat.bits_append_bit
File: Mathlib/Data/Nat/Bits.lean

tactic: rw [Nat.bits, binaryRec_eq']
state_before: m n✝ n : ℕ
b : Bool
hn : n = 0 → b = true
⊢ (bit b n).bits = b :: n.bits
state_after: case h
m n✝ n : ℕ
b : Bool
hn : n = 0 → b = true
⊢ [false] = [] ∨ (n = 0 → b = true)

tactic: simpa
state_before: case h
m n✝ n : ℕ
b : Bool
hn : n = 0 → b = true
⊢ [false] = [] ∨ (n = 0 → b = true)
state_after: no goals
Theorem: orderOf_eq_prime_pow
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: apply minimalPeriod_eq_prime_pow <;> rwa [isPeriodicPt_mul_iff_pow_eq_one]
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : Monoid G
a b x y : G
n m p : ℕ
hp : Fact (Nat.Prime p)
hnot : ¬x ^ p ^ n = 1
hfin : x ^ p ^ (n + 1) = 1
⊢ orderOf x = p ^ (n + 1)
state_after: no goals
Theorem: CharTwo.bit0_apply_eq_zero
File: Mathlib/Algebra/CharP/Two.lean

tactic: simp
state_before: R : Type u_1
ι : Type u_2
inst✝¹ : Semiring R
inst✝ : CharP R 2
x : R
⊢ bit0 x = 0
state_after: no goals
Theorem: Set.range_unique
File: Mathlib/Data/Set/Image.lean

tactic: ext x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : ι → α
s t : Set α
h : Unique ι
⊢ range f = {f default}
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : ι → α
s t : Set α
h : Unique ι
x : α
⊢ x ∈ range f ↔ x ∈ {f default}

tactic: rw [mem_range]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : ι → α
s t : Set α
h : Unique ι
x : α
⊢ x ∈ range f ↔ x ∈ {f default}
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : ι → α
s t : Set α
h : Unique ι
x : α
⊢ (∃ y, f y = x) ↔ x ∈ {f default}

tactic: constructor
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : ι → α
s t : Set α
h : Unique ι
x : α
⊢ (∃ y, f y = x) ↔ x ∈ {f default}
state_after: case h.mp
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : ι → α
s t : Set α
h : Unique ι
x : α
⊢ (∃ y, f y = x) → x ∈ {f default}

case h.mpr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : ι → α
s t : Set α
h : Unique ι
x : α
⊢ x ∈ {f default} → ∃ y, f y = x

tactic: rintro ⟨i, hi⟩
state_before: case h.mp
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : ι → α
s t : Set α
h : Unique ι
x : α
⊢ (∃ y, f y = x) → x ∈ {f default}
state_after: case h.mp.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : ι → α
s t : Set α
h : Unique ι
x : α
i : ι
hi : f i = x
⊢ x ∈ {f default}

tactic: rw [h.uniq i] at hi
state_before: case h.mp.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : ι → α
s t : Set α
h : Unique ι
x : α
i : ι
hi : f i = x
⊢ x ∈ {f default}
state_after: case h.mp.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : ι → α
s t : Set α
h : Unique ι
x : α
i : ι
hi : f default = x
⊢ x ∈ {f default}

tactic: exact hi ▸ mem_singleton _
state_before: case h.mp.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : ι → α
s t : Set α
h : Unique ι
x : α
i : ι
hi : f default = x
⊢ x ∈ {f default}
state_after: no goals

tactic: exact fun h => ⟨default, h.symm⟩
state_before: case h.mpr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : ι → α
s t : Set α
h : Unique ι
x : α
⊢ x ∈ {f default} → ∃ y, f y = x
state_after: no goals
Theorem: StrictConvexOn.sup
File: Mathlib/Analysis/Convex/Function.lean

tactic: gcongr <;> apply le_sup_left
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
α : Type u_4
β : Type u_5
ι : Type u_6
inst✝⁶ : OrderedSemiring 𝕜
inst✝⁵ : AddCommMonoid E
inst✝⁴ : AddCommMonoid F
inst✝³ : LinearOrderedAddCommMonoid β
inst✝² : SMul 𝕜 E
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s : Set E
f g : E → β
hf : StrictConvexOn 𝕜 s f
hg : StrictConvexOn 𝕜 s g
x : E
hx : x ∈ s
y : E
hy : y ∈ s
hxy : x ≠ y
a b : 𝕜
ha : 0 < a
hb : 0 < b
hab : a + b = 1
⊢ a • f x + b • f y ≤ a • (f x ⊔ g x) + b • (f y ⊔ g y)
state_after: no goals

tactic: gcongr <;> apply le_sup_right
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
α : Type u_4
β : Type u_5
ι : Type u_6
inst✝⁶ : OrderedSemiring 𝕜
inst✝⁵ : AddCommMonoid E
inst✝⁴ : AddCommMonoid F
inst✝³ : LinearOrderedAddCommMonoid β
inst✝² : SMul 𝕜 E
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s : Set E
f g : E → β
hf : StrictConvexOn 𝕜 s f
hg : StrictConvexOn 𝕜 s g
x : E
hx : x ∈ s
y : E
hy : y ∈ s
hxy : x ≠ y
a b : 𝕜
ha : 0 < a
hb : 0 < b
hab : a + b = 1
⊢ a • g x + b • g y ≤ a • (f x ⊔ g x) + b • (f y ⊔ g y)
state_after: no goals
Theorem: groupCohomology.isMulTwoCoboundary_of_twoCoboundaries
File: Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean

tactic: rcases mem_range_of_mem_twoCoboundaries f.2 with ⟨x, hx⟩
state_before: k G✝ : Type u
inst✝⁴ : CommRing k
inst✝³ : Group G✝
A : Rep k G✝
G M : Type
inst✝² : Group G
inst✝¹ : CommGroup M
inst✝ : MulDistribMulAction G M
f : ↥(twoCoboundaries (Rep.ofMulDistribMulAction G M))
⊢ IsMulTwoCoboundary (⇑Additive.toMul ∘ ↑↑f)
state_after: case intro
k G✝ : Type u
inst✝⁴ : CommRing k
inst✝³ : Group G✝
A : Rep k G✝
G M : Type
inst✝² : Group G
inst✝¹ : CommGroup M
inst✝ : MulDistribMulAction G M
f : ↥(twoCoboundaries (Rep.ofMulDistribMulAction G M))
x : G → CoeSort.coe (Rep.ofMulDistribMulAction G M)
hx : (dOne (Rep.ofMulDistribMulAction G M)) x = (twoCocycles (Rep.ofMulDistribMulAction G M)).subtype ↑f
⊢ IsMulTwoCoboundary (⇑Additive.toMul ∘ ↑↑f)

tactic: exact ⟨x, fun g h => Function.funext_iff.1 hx (g, h)⟩
state_before: case intro
k G✝ : Type u
inst✝⁴ : CommRing k
inst✝³ : Group G✝
A : Rep k G✝
G M : Type
inst✝² : Group G
inst✝¹ : CommGroup M
inst✝ : MulDistribMulAction G M
f : ↥(twoCoboundaries (Rep.ofMulDistribMulAction G M))
x : G → CoeSort.coe (Rep.ofMulDistribMulAction G M)
hx : (dOne (Rep.ofMulDistribMulAction G M)) x = (twoCocycles (Rep.ofMulDistribMulAction G M)).subtype ↑f
⊢ IsMulTwoCoboundary (⇑Additive.toMul ∘ ↑↑f)
state_after: no goals
Theorem: Function.periodicOrbit_chain'
File: Mathlib/Dynamics/PeriodicPts.lean

tactic: rw [periodicOrbit_chain r]
state_before: α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
⊢ Cycle.Chain r (periodicOrbit f x) ↔ ∀ (n : ℕ), r (f^[n] x) (f^[n + 1] x)
state_after: α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
⊢ (∀ n < minimalPeriod f x, r (f^[n] x) (f^[n + 1] x)) ↔ ∀ (n : ℕ), r (f^[n] x) (f^[n + 1] x)

tactic: refine ⟨fun H n => ?_, fun H n _ => H n⟩
state_before: α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
⊢ (∀ n < minimalPeriod f x, r (f^[n] x) (f^[n + 1] x)) ↔ ∀ (n : ℕ), r (f^[n] x) (f^[n + 1] x)
state_after: α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n✝ : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
H : ∀ n < minimalPeriod f x, r (f^[n] x) (f^[n + 1] x)
n : ℕ
⊢ r (f^[n] x) (f^[n + 1] x)

tactic: rw [iterate_succ_apply, ← iterate_mod_minimalPeriod_eq, ← iterate_mod_minimalPeriod_eq (n := n),
  ← iterate_succ_apply, minimalPeriod_apply hx]
state_before: α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n✝ : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
H : ∀ n < minimalPeriod f x, r (f^[n] x) (f^[n + 1] x)
n : ℕ
⊢ r (f^[n] x) (f^[n + 1] x)
state_after: α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n✝ : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
H : ∀ n < minimalPeriod f x, r (f^[n] x) (f^[n + 1] x)
n : ℕ
⊢ r (f^[n % minimalPeriod f x] x) (f^[(n % minimalPeriod f x).succ] x)

tactic: exact H _ (mod_lt _ (minimalPeriod_pos_of_mem_periodicPts hx))
state_before: α : Type u_1
β : Type u_2
f✝ fa : α → α
fb : β → β
x✝ y : α
m n✝ : ℕ
r : α → α → Prop
f : α → α
x : α
hx : x ∈ periodicPts f
H : ∀ n < minimalPeriod f x, r (f^[n] x) (f^[n + 1] x)
n : ℕ
⊢ r (f^[n % minimalPeriod f x] x) (f^[(n % minimalPeriod f x).succ] x)
state_after: no goals
Theorem: bernsteinApproximation.apply
File: Mathlib/Analysis/SpecialFunctions/Bernstein.lean

tactic: simp [bernsteinApproximation]
state_before: n : ℕ
f : C(↑I, ℝ)
x : ↑I
⊢ (bernsteinApproximation n f) x = ∑ k : Fin (n + 1), f k/ₙ * (bernstein n ↑k) x
state_after: no goals
Theorem: continuousAt_sign_of_ne_zero
File: Mathlib/Topology/Instances/Sign.lean

tactic: rcases h.lt_or_lt with (h_neg | h_pos)
state_before: α : Type u_1
inst✝³ : Zero α
inst✝² : TopologicalSpace α
inst✝¹ : LinearOrder α
inst✝ : OrderTopology α
a : α
h : a ≠ 0
⊢ ContinuousAt (⇑SignType.sign) a
state_after: case inl
α : Type u_1
inst✝³ : Zero α
inst✝² : TopologicalSpace α
inst✝¹ : LinearOrder α
inst✝ : OrderTopology α
a : α
h : a ≠ 0
h_neg : a < 0
⊢ ContinuousAt (⇑SignType.sign) a

case inr
α : Type u_1
inst✝³ : Zero α
inst✝² : TopologicalSpace α
inst✝¹ : LinearOrder α
inst✝ : OrderTopology α
a : α
h : a ≠ 0
h_pos : 0 < a
⊢ ContinuousAt (⇑SignType.sign) a

tactic: exact continuousAt_sign_of_neg h_neg
state_before: case inl
α : Type u_1
inst✝³ : Zero α
inst✝² : TopologicalSpace α
inst✝¹ : LinearOrder α
inst✝ : OrderTopology α
a : α
h : a ≠ 0
h_neg : a < 0
⊢ ContinuousAt (⇑SignType.sign) a
state_after: no goals

tactic: exact continuousAt_sign_of_pos h_pos
state_before: case inr
α : Type u_1
inst✝³ : Zero α
inst✝² : TopologicalSpace α
inst✝¹ : LinearOrder α
inst✝ : OrderTopology α
a : α
h : a ≠ 0
h_pos : 0 < a
⊢ ContinuousAt (⇑SignType.sign) a
state_after: no goals
Theorem: Path.Homotopy.continuous_transReflReparamAux
File: Mathlib/AlgebraicTopology/FundamentalGroupoid/Basic.lean

tactic: refine continuous_if_le ?_ ?_ (Continuous.continuousOn ?_) (Continuous.continuousOn ?_) ?_ <;>
  [continuity; continuity; continuity; continuity; skip]
state_before: X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
⊢ Continuous transReflReparamAux
state_after: case refine_5
X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
⊢ ∀ (x : ↑I), ↑x = 1 / 2 → 2 * ↑x = 1

tactic: intro x hx
state_before: case refine_5
X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
⊢ ∀ (x : ↑I), ↑x = 1 / 2 → 2 * ↑x = 1
state_after: case refine_5
X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
x : ↑I
hx : ↑x = 1 / 2
⊢ 2 * ↑x = 1

tactic: simp [hx]
state_before: case refine_5
X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
x : ↑I
hx : ↑x = 1 / 2
⊢ 2 * ↑x = 1
state_after: no goals
Theorem: HomologicalComplex₂.XXIsoOfEq_hom_ιTotal
File: Mathlib/Algebra/Homology/TotalComplex.lean

tactic: rw [h₁, h₂, h]
state_before: C : Type u_1
inst✝⁴ : Category.{?u.67564, u_1} C
inst✝³ : Preadditive C
I₁ : Type u_2
I₂ : Type u_3
I₁₂ : Type u_4
c₁ : ComplexShape I₁
c₂ : ComplexShape I₂
K L M : HomologicalComplex₂ C c₁ c₂
φ : K ⟶ L
e : K ≅ L
ψ : L ⟶ M
c₁₂ : ComplexShape I₁₂
inst✝² : DecidableEq I₁₂
inst✝¹ : TotalComplexShape c₁ c₂ c₁₂
inst✝ : K.HasTotal c₁₂
x₁ y₁ : I₁
h₁ : x₁ = y₁
x₂ y₂ : I₂
h₂ : x₂ = y₂
i₁₂ : I₁₂
h : c₁.π c₂ c₁₂ (y₁, y₂) = i₁₂
⊢ c₁.π c₂ c₁₂ (x₁, x₂) = i₁₂
state_after: no goals

tactic: subst h₁ h₂
state_before: C : Type u_1
inst✝⁴ : Category.{u_5, u_1} C
inst✝³ : Preadditive C
I₁ : Type u_2
I₂ : Type u_3
I₁₂ : Type u_4
c₁ : ComplexShape I₁
c₂ : ComplexShape I₂
K L M : HomologicalComplex₂ C c₁ c₂
φ : K ⟶ L
e : K ≅ L
ψ : L ⟶ M
c₁₂ : ComplexShape I₁₂
inst✝² : DecidableEq I₁₂
inst✝¹ : TotalComplexShape c₁ c₂ c₁₂
inst✝ : K.HasTotal c₁₂
x₁ y₁ : I₁
h₁ : x₁ = y₁
x₂ y₂ : I₂
h₂ : x₂ = y₂
i₁₂ : I₁₂
h : c₁.π c₂ c₁₂ (y₁, y₂) = i₁₂
⊢ (XXIsoOfEq C c₁ c₂ K h₁ h₂).hom ≫ K.ιTotal c₁₂ y₁ y₂ i₁₂ h = K.ιTotal c₁₂ x₁ x₂ i₁₂ ⋯
state_after: C : Type u_1
inst✝⁴ : Category.{u_5, u_1} C
inst✝³ : Preadditive C
I₁ : Type u_2
I₂ : Type u_3
I₁₂ : Type u_4
c₁ : ComplexShape I₁
c₂ : ComplexShape I₂
K L M : HomologicalComplex₂ C c₁ c₂
φ : K ⟶ L
e : K ≅ L
ψ : L ⟶ M
c₁₂ : ComplexShape I₁₂
inst✝² : DecidableEq I₁₂
inst✝¹ : TotalComplexShape c₁ c₂ c₁₂
inst✝ : K.HasTotal c₁₂
x₁ : I₁
x₂ : I₂
i₁₂ : I₁₂
h : c₁.π c₂ c₁₂ (x₁, x₂) = i₁₂
⊢ (XXIsoOfEq C c₁ c₂ K ⋯ ⋯).hom ≫ K.ιTotal c₁₂ x₁ x₂ i₁₂ h = K.ιTotal c₁₂ x₁ x₂ i₁₂ ⋯

tactic: simp
state_before: C : Type u_1
inst✝⁴ : Category.{u_5, u_1} C
inst✝³ : Preadditive C
I₁ : Type u_2
I₂ : Type u_3
I₁₂ : Type u_4
c₁ : ComplexShape I₁
c₂ : ComplexShape I₂
K L M : HomologicalComplex₂ C c₁ c₂
φ : K ⟶ L
e : K ≅ L
ψ : L ⟶ M
c₁₂ : ComplexShape I₁₂
inst✝² : DecidableEq I₁₂
inst✝¹ : TotalComplexShape c₁ c₂ c₁₂
inst✝ : K.HasTotal c₁₂
x₁ : I₁
x₂ : I₂
i₁₂ : I₁₂
h : c₁.π c₂ c₁₂ (x₁, x₂) = i₁₂
⊢ (XXIsoOfEq C c₁ c₂ K ⋯ ⋯).hom ≫ K.ιTotal c₁₂ x₁ x₂ i₁₂ h = K.ιTotal c₁₂ x₁ x₂ i₁₂ ⋯
state_after: no goals
Theorem: List.getElem_ofFn_go
File: Mathlib/Data/List/OfFn.lean

tactic: simp at hk
state_before: α : Type u
n : ℕ
f : Fin n → α
i j : ℕ
h : i + j = n
k : ℕ
hk : k < (ofFn.go f i j h).length
⊢ j + k < n
state_after: α : Type u
n : ℕ
f : Fin n → α
i j : ℕ
h : i + j = n
k : ℕ
hk : k < i
⊢ j + k < n

tactic: omega
state_before: α : Type u
n : ℕ
f : Fin n → α
i j : ℕ
h : i + j = n
k : ℕ
hk : k < i
⊢ j + k < n
state_after: no goals

tactic: let i+1 := i
state_before: α : Type u
n : ℕ
f : Fin n → α
i j : ℕ
h : i + j = n
k : ℕ
hk : k < (ofFn.go f i j h).length
⊢ (ofFn.go f i j h)[k] = f ⟨j + k, ⋯⟩
state_after: α : Type u
n : ℕ
f : Fin n → α
i✝ j k i : ℕ
h : i + 1 + j = n
hk : k < (ofFn.go f (i + 1) j h).length
⊢ (ofFn.go f (i + 1) j h)[k] = f ⟨j + k, ⋯⟩

tactic: cases k <;> simp [ofFn.go, getElem_ofFn_go (i := i)]
state_before: α : Type u
n : ℕ
f : Fin n → α
i✝ j k i : ℕ
h : i + 1 + j = n
hk : k < (ofFn.go f (i + 1) j h).length
⊢ (ofFn.go f (i + 1) j h)[k] = f ⟨j + k, ⋯⟩
state_after: case succ
α : Type u
n : ℕ
f : Fin n → α
i✝ j i : ℕ
h : i + 1 + j = n
n✝ : ℕ
hk : n✝ + 1 < (ofFn.go f (i + 1) j h).length
⊢ f ⟨j + 1 + n✝, ⋯⟩ = f ⟨j + (n✝ + 1), ⋯⟩

tactic: congr 2
state_before: case succ
α : Type u
n : ℕ
f : Fin n → α
i✝ j i : ℕ
h : i + 1 + j = n
n✝ : ℕ
hk : n✝ + 1 < (ofFn.go f (i + 1) j h).length
⊢ f ⟨j + 1 + n✝, ⋯⟩ = f ⟨j + (n✝ + 1), ⋯⟩
state_after: case succ.e_a.e_val
α : Type u
n : ℕ
f : Fin n → α
i✝ j i : ℕ
h : i + 1 + j = n
n✝ : ℕ
hk : n✝ + 1 < (ofFn.go f (i + 1) j h).length
⊢ j + 1 + n✝ = j + (n✝ + 1)

tactic: omega
state_before: case succ.e_a.e_val
α : Type u
n : ℕ
f : Fin n → α
i✝ j i : ℕ
h : i + 1 + j = n
n✝ : ℕ
hk : n✝ + 1 < (ofFn.go f (i + 1) j h).length
⊢ j + 1 + n✝ = j + (n✝ + 1)
state_after: no goals
Theorem: Complex.cpow_zero
File: Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean

tactic: simp [cpow_def]
state_before: x : ℂ
⊢ x ^ 0 = 1
state_after: no goals
Theorem: Finset.union_product
File: Mathlib/Data/Finset/Prod.lean

tactic: ext ⟨x, y⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s s' : Finset α
t t' : Finset β
a : α
b : β
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
⊢ (s ∪ s') ×ˢ t = s ×ˢ t ∪ s' ×ˢ t
state_after: case a.mk
α : Type u_1
β : Type u_2
γ : Type u_3
s s' : Finset α
t t' : Finset β
a : α
b : β
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
x : α
y : β
⊢ (x, y) ∈ (s ∪ s') ×ˢ t ↔ (x, y) ∈ s ×ˢ t ∪ s' ×ˢ t

tactic: simp only [or_and_right, mem_union, mem_product]
state_before: case a.mk
α : Type u_1
β : Type u_2
γ : Type u_3
s s' : Finset α
t t' : Finset β
a : α
b : β
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
x : α
y : β
⊢ (x, y) ∈ (s ∪ s') ×ˢ t ↔ (x, y) ∈ s ×ˢ t ∪ s' ×ˢ t
state_after: no goals
Theorem: Equiv.Perm.mem_cycleFactorsFinset_iff
File: Mathlib/GroupTheory/Perm/Cycle/Factors.lean

tactic: obtain ⟨l, hl, hl'⟩ := f.cycleFactorsFinset.exists_list_nodup_eq
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ f p : Perm α
⊢ p ∈ f.cycleFactorsFinset ↔ p.IsCycle ∧ ∀ a ∈ p.support, p a = f a
state_after: case intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ f p : Perm α
l : List (Perm α)
hl : l.Nodup
hl' : l.toFinset = f.cycleFactorsFinset
⊢ p ∈ f.cycleFactorsFinset ↔ p.IsCycle ∧ ∀ a ∈ p.support, p a = f a

tactic: rw [← hl']
state_before: case intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ f p : Perm α
l : List (Perm α)
hl : l.Nodup
hl' : l.toFinset = f.cycleFactorsFinset
⊢ p ∈ f.cycleFactorsFinset ↔ p.IsCycle ∧ ∀ a ∈ p.support, p a = f a
state_after: case intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ f p : Perm α
l : List (Perm α)
hl : l.Nodup
hl' : l.toFinset = f.cycleFactorsFinset
⊢ p ∈ l.toFinset ↔ p.IsCycle ∧ ∀ a ∈ p.support, p a = f a

tactic: rw [eq_comm, cycleFactorsFinset_eq_list_toFinset hl] at hl'
state_before: case intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ f p : Perm α
l : List (Perm α)
hl : l.Nodup
hl' : l.toFinset = f.cycleFactorsFinset
⊢ p ∈ l.toFinset ↔ p.IsCycle ∧ ∀ a ∈ p.support, p a = f a
state_after: case intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ f p : Perm α
l : List (Perm α)
hl : l.Nodup
hl' : (∀ f ∈ l, f.IsCycle) ∧ List.Pairwise Disjoint l ∧ l.prod = f
⊢ p ∈ l.toFinset ↔ p.IsCycle ∧ ∀ a ∈ p.support, p a = f a

tactic: simpa [List.mem_toFinset, Ne, ← hl'.right.right] using
  mem_list_cycles_iff hl'.left hl'.right.left
state_before: case intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ f p : Perm α
l : List (Perm α)
hl : l.Nodup
hl' : (∀ f ∈ l, f.IsCycle) ∧ List.Pairwise Disjoint l ∧ l.prod = f
⊢ p ∈ l.toFinset ↔ p.IsCycle ∧ ∀ a ∈ p.support, p a = f a
state_after: no goals
Theorem: ZMod.exists_sq_eq_two_iff
File: Mathlib/NumberTheory/LegendreSymbol/QuadraticReciprocity.lean

tactic: rw [FiniteField.isSquare_two_iff, card p]
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
⊢ IsSquare 2 ↔ p % 8 = 1 ∨ p % 8 = 7
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
⊢ p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7

tactic: have h₁ := Prime.mod_two_eq_one_iff_ne_two.mpr hp
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
⊢ p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
h₁ : p % 2 = 1
⊢ p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7

tactic: rw [← mod_mod_of_dvd p (by decide : 2 ∣ 8)] at h₁
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
h₁ : p % 2 = 1
⊢ p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
h₁ : p % 8 % 2 = 1
⊢ p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7

tactic: have h₂ := mod_lt p (by norm_num : 0 < 8)
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
h₁ : p % 8 % 2 = 1
⊢ p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
h₁ : p % 8 % 2 = 1
h₂ : p % 8 < 8
⊢ p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7

tactic: revert h₂ h₁
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
h₁ : p % 8 % 2 = 1
h₂ : p % 8 < 8
⊢ p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
⊢ p % 8 % 2 = 1 → p % 8 < 8 → (p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7)

tactic: generalize p % 8 = m
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
⊢ p % 8 % 2 = 1 → p % 8 < 8 → (p % 8 ≠ 3 ∧ p % 8 ≠ 5 ↔ p % 8 = 1 ∨ p % 8 = 7)
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
m : ℕ
⊢ m % 2 = 1 → m < 8 → (m ≠ 3 ∧ m ≠ 5 ↔ m = 1 ∨ m = 7)

tactic: clear! p
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
m : ℕ
⊢ m % 2 = 1 → m < 8 → (m ≠ 3 ∧ m ≠ 5 ↔ m = 1 ∨ m = 7)
state_after: m : ℕ
⊢ m % 2 = 1 → m < 8 → (m ≠ 3 ∧ m ≠ 5 ↔ m = 1 ∨ m = 7)

tactic: intros
state_before: m : ℕ
⊢ m % 2 = 1 → m < 8 → (m ≠ 3 ∧ m ≠ 5 ↔ m = 1 ∨ m = 7)
state_after: m : ℕ
h₁✝ : m % 2 = 1
h₂✝ : m < 8
⊢ m ≠ 3 ∧ m ≠ 5 ↔ m = 1 ∨ m = 7

tactic: interval_cases m <;> simp_all
state_before: m : ℕ
h₁✝ : m % 2 = 1
h₂✝ : m < 8
⊢ m ≠ 3 ∧ m ≠ 5 ↔ m = 1 ∨ m = 7
state_after: no goals

tactic: decide
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
h₁ : p % 2 = 1
⊢ 2 ∣ 8
state_after: no goals

tactic: norm_num
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
hp : p ≠ 2
h₁ : p % 8 % 2 = 1
⊢ 0 < 8
state_after: no goals
Theorem: Fin.prod_univ_get
File: Mathlib/Algebra/BigOperators/Fin.lean

tactic: simp [Finset.prod_eq_multiset_prod]
state_before: α : Type u_1
β : Type u_2
inst✝ : CommMonoid α
l : List α
⊢ ∏ i : Fin l.length, l[↑i] = l.prod
state_after: no goals
Theorem: PartENat.withTopEquiv_symm_coe
File: Mathlib/Data/Nat/PartENat.lean

tactic: simp
state_before: n : ℕ
⊢ withTopEquiv.symm ↑n = ↑n
state_after: no goals