1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Nat.mem_factors_mul_of_coprime
File: Mathlib/Data/Nat/Factors.lean

tactic: rcases a.eq_zero_or_pos with (rfl | ha)
state_before: a b : ℕ
hab : a.Coprime b
p : ℕ
⊢ p ∈ (a * b).factors ↔ p ∈ a.factors ∪ b.factors
state_after: case inl
b p : ℕ
hab : Coprime 0 b
⊢ p ∈ (0 * b).factors ↔ p ∈ factors 0 ∪ b.factors

case inr
a b : ℕ
hab : a.Coprime b
p : ℕ
ha : a > 0
⊢ p ∈ (a * b).factors ↔ p ∈ a.factors ∪ b.factors

tactic: rcases b.eq_zero_or_pos with (rfl | hb)
state_before: case inr
a b : ℕ
hab : a.Coprime b
p : ℕ
ha : a > 0
⊢ p ∈ (a * b).factors ↔ p ∈ a.factors ∪ b.factors
state_after: case inr.inl
a p : ℕ
ha : a > 0
hab : a.Coprime 0
⊢ p ∈ (a * 0).factors ↔ p ∈ a.factors ∪ factors 0

case inr.inr
a b : ℕ
hab : a.Coprime b
p : ℕ
ha : a > 0
hb : b > 0
⊢ p ∈ (a * b).factors ↔ p ∈ a.factors ∪ b.factors

tactic: rw [mem_factors_mul ha.ne' hb.ne', List.mem_union_iff]
state_before: case inr.inr
a b : ℕ
hab : a.Coprime b
p : ℕ
ha : a > 0
hb : b > 0
⊢ p ∈ (a * b).factors ↔ p ∈ a.factors ∪ b.factors
state_after: no goals

tactic: simp [(coprime_zero_left _).mp hab]
state_before: case inl
b p : ℕ
hab : Coprime 0 b
⊢ p ∈ (0 * b).factors ↔ p ∈ factors 0 ∪ b.factors
state_after: no goals

tactic: simp [(coprime_zero_right _).mp hab]
state_before: case inr.inl
a p : ℕ
ha : a > 0
hab : a.Coprime 0
⊢ p ∈ (a * 0).factors ↔ p ∈ a.factors ∪ factors 0
state_after: no goals
Theorem: CategoryTheory.SmallObject.ι_functorMapTgt
File: Mathlib/CategoryTheory/SmallObject/Construction.lean

tactic: rw [← w, ← fac, assoc, hφ]
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
I : Type w
A B : I → C
f : (i : I) → A i ⟶ B i
S X Y Z : C
πX : X ⟶ S
πY : Y ⟶ S
φ : X ⟶ Y
hφ : φ ≫ πY = πX
inst✝³ : HasColimitsOfShape (Discrete (FunctorObjIndex f πX)) C
inst✝² : HasColimitsOfShape (Discrete (FunctorObjIndex f πY)) C
inst✝¹ : HasPushout (functorObjTop f πX) (functorObjLeft f πX)
inst✝ : HasPushout (functorObjTop f πY) (functorObjLeft f πY)
i : I
t : A i ⟶ X
b : B i ⟶ S
w : t ≫ πX = f i ≫ b
t' : A i ⟶ Y
fac : t ≫ φ = t'
⊢ t' ≫ πY = f i ≫ b
state_after: no goals

tactic: subst fac
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
I : Type w
A B : I → C
f : (i : I) → A i ⟶ B i
S X Y Z : C
πX : X ⟶ S
πY : Y ⟶ S
φ : X ⟶ Y
hφ : φ ≫ πY = πX
inst✝³ : HasColimitsOfShape (Discrete (FunctorObjIndex f πX)) C
inst✝² : HasColimitsOfShape (Discrete (FunctorObjIndex f πY)) C
inst✝¹ : HasPushout (functorObjTop f πX) (functorObjLeft f πX)
inst✝ : HasPushout (functorObjTop f πY) (functorObjLeft f πY)
i : I
t : A i ⟶ X
b : B i ⟶ S
w : t ≫ πX = f i ≫ b
t' : A i ⟶ Y
fac : t ≫ φ = t'
⊢ Sigma.ι (functorObjTgtFamily f πX) { i := i, t := t, b := b, w := w } ≫ functorMapTgt f πX πY φ hφ =
    Sigma.ι (functorObjTgtFamily f πY) { i := i, t := t', b := b, w := ⋯ }
state_after: C : Type u
inst✝⁴ : Category.{v, u} C
I : Type w
A B : I → C
f : (i : I) → A i ⟶ B i
S X Y Z : C
πX : X ⟶ S
πY : Y ⟶ S
φ : X ⟶ Y
hφ : φ ≫ πY = πX
inst✝³ : HasColimitsOfShape (Discrete (FunctorObjIndex f πX)) C
inst✝² : HasColimitsOfShape (Discrete (FunctorObjIndex f πY)) C
inst✝¹ : HasPushout (functorObjTop f πX) (functorObjLeft f πX)
inst✝ : HasPushout (functorObjTop f πY) (functorObjLeft f πY)
i : I
t : A i ⟶ X
b : B i ⟶ S
w : t ≫ πX = f i ≫ b
⊢ Sigma.ι (functorObjTgtFamily f πX) { i := i, t := t, b := b, w := w } ≫ functorMapTgt f πX πY φ hφ =
    Sigma.ι (functorObjTgtFamily f πY) { i := i, t := t ≫ φ, b := b, w := ⋯ }

tactic: simp [functorMapTgt]
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
I : Type w
A B : I → C
f : (i : I) → A i ⟶ B i
S X Y Z : C
πX : X ⟶ S
πY : Y ⟶ S
φ : X ⟶ Y
hφ : φ ≫ πY = πX
inst✝³ : HasColimitsOfShape (Discrete (FunctorObjIndex f πX)) C
inst✝² : HasColimitsOfShape (Discrete (FunctorObjIndex f πY)) C
inst✝¹ : HasPushout (functorObjTop f πX) (functorObjLeft f πX)
inst✝ : HasPushout (functorObjTop f πY) (functorObjLeft f πY)
i : I
t : A i ⟶ X
b : B i ⟶ S
w : t ≫ πX = f i ≫ b
⊢ Sigma.ι (functorObjTgtFamily f πX) { i := i, t := t, b := b, w := w } ≫ functorMapTgt f πX πY φ hφ =
    Sigma.ι (functorObjTgtFamily f πY) { i := i, t := t ≫ φ, b := b, w := ⋯ }
state_after: no goals
Theorem: MeasureTheory.Memℒp.evariance_lt_top
File: Mathlib/Probability/Variance.lean

tactic: have := ENNReal.pow_lt_top (hX.sub <| memℒp_const <| μ[X]).2 2
state_before: Ω : Type u_1
m : MeasurableSpace Ω
X : Ω → ℝ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
hX : Memℒp X 2 μ
⊢ evariance X μ < ⊤
state_after: Ω : Type u_1
m : MeasurableSpace Ω
X : Ω → ℝ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
hX : Memℒp X 2 μ
this : snorm (X - fun x => ∫ (x : Ω), X x ∂μ) 2 μ ^ 2 < ⊤
⊢ evariance X μ < ⊤

tactic: rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top, ← ENNReal.rpow_two] at this
state_before: Ω : Type u_1
m : MeasurableSpace Ω
X : Ω → ℝ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
hX : Memℒp X 2 μ
this : snorm (X - fun x => ∫ (x : Ω), X x ∂μ) 2 μ ^ 2 < ⊤
⊢ evariance X μ < ⊤
state_after: Ω : Type u_1
m : MeasurableSpace Ω
X : Ω → ℝ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
hX : Memℒp X 2 μ
this : ((∫⁻ (x : Ω), ↑‖(X - fun x => ∫ (x : Ω), X x ∂μ) x‖₊ ^ ENNReal.toReal 2 ∂μ) ^ (1 / ENNReal.toReal 2)) ^ 2 < ⊤
⊢ evariance X μ < ⊤

tactic: simp only [ENNReal.toReal_ofNat, Pi.sub_apply, ENNReal.one_toReal, one_div] at this
state_before: Ω : Type u_1
m : MeasurableSpace Ω
X : Ω → ℝ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
hX : Memℒp X 2 μ
this : ((∫⁻ (x : Ω), ↑‖(X - fun x => ∫ (x : Ω), X x ∂μ) x‖₊ ^ ENNReal.toReal 2 ∂μ) ^ (1 / ENNReal.toReal 2)) ^ 2 < ⊤
⊢ evariance X μ < ⊤
state_after: Ω : Type u_1
m : MeasurableSpace Ω
X : Ω → ℝ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
hX : Memℒp X 2 μ
this : ((∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 ∂μ) ^ 2⁻¹) ^ 2 < ⊤
⊢ evariance X μ < ⊤

tactic: rw [← ENNReal.rpow_mul, inv_mul_cancel (two_ne_zero : (2 : ℝ) ≠ 0), ENNReal.rpow_one] at this
state_before: Ω : Type u_1
m : MeasurableSpace Ω
X : Ω → ℝ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
hX : Memℒp X 2 μ
this : ((∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 ∂μ) ^ 2⁻¹) ^ 2 < ⊤
⊢ evariance X μ < ⊤
state_after: Ω : Type u_1
m : MeasurableSpace Ω
X : Ω → ℝ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
hX : Memℒp X 2 μ
this : ∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 ∂μ < ⊤
⊢ evariance X μ < ⊤

tactic: exact this
state_before: Ω : Type u_1
m : MeasurableSpace Ω
X : Ω → ℝ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
hX : Memℒp X 2 μ
this : ∫⁻ (x : Ω), ↑‖X x - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 ∂μ < ⊤
⊢ evariance X μ < ⊤
state_after: no goals
Theorem: List.length_rotate'
File: Mathlib/Data/List/Rotate.lean

tactic: simp
state_before: α : Type u
x✝ : ℕ
⊢ ([].rotate' x✝).length = [].length
state_after: no goals

tactic: rw [List.rotate', length_rotate' (l ++ [a]) n]
state_before: α : Type u
a : α
l : List α
n : ℕ
⊢ ((a :: l).rotate' (n + 1)).length = (a :: l).length
state_after: α : Type u
a : α
l : List α
n : ℕ
⊢ (l ++ [a]).length = (a :: l).length

tactic: simp
state_before: α : Type u
a : α
l : List α
n : ℕ
⊢ (l ++ [a]).length = (a :: l).length
state_after: no goals
Theorem: Cardinal.mk_vector
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: simp
state_before: α✝ β : Type u
c : Cardinal.{?u.176141}
α : Type u
n : ℕ
⊢ #(Fin n → α) = #α ^ n
state_after: no goals
Theorem: MeasureTheory.hasFiniteIntegral_iff_norm
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: simp only [HasFiniteIntegral, ofReal_norm_eq_coe_nnnorm]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f : α → β
⊢ HasFiniteIntegral f μ ↔ ∫⁻ (a : α), ENNReal.ofReal ‖f a‖ ∂μ < ⊤
state_after: no goals
Theorem: CategoryTheory.GrothendieckTopology.plusMap_comp
File: Mathlib/CategoryTheory/Sites/Plus.lean

tactic: ext : 2
state_before: C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝² : Category.{max v u, w} D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : J.Cover X), HasMultiequalizer (S.index P)
P✝ : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (J.Cover X)ᵒᵖ D
P Q R : Cᵒᵖ ⥤ D
η : P ⟶ Q
γ : Q ⟶ R
⊢ J.plusMap (η ≫ γ) = J.plusMap η ≫ J.plusMap γ
state_after: case w.h
C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝² : Category.{max v u, w} D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : J.Cover X), HasMultiequalizer (S.index P)
P✝ : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (J.Cover X)ᵒᵖ D
P Q R : Cᵒᵖ ⥤ D
η : P ⟶ Q
γ : Q ⟶ R
x✝ : Cᵒᵖ
⊢ (J.plusMap (η ≫ γ)).app x✝ = (J.plusMap η ≫ J.plusMap γ).app x✝

tactic: refine colimit.hom_ext (fun S => ?_)
state_before: case w.h
C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝² : Category.{max v u, w} D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : J.Cover X), HasMultiequalizer (S.index P)
P✝ : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (J.Cover X)ᵒᵖ D
P Q R : Cᵒᵖ ⥤ D
η : P ⟶ Q
γ : Q ⟶ R
x✝ : Cᵒᵖ
⊢ (J.plusMap (η ≫ γ)).app x✝ = (J.plusMap η ≫ J.plusMap γ).app x✝
state_after: case w.h
C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝² : Category.{max v u, w} D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : J.Cover X), HasMultiequalizer (S.index P)
P✝ : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (J.Cover X)ᵒᵖ D
P Q R : Cᵒᵖ ⥤ D
η : P ⟶ Q
γ : Q ⟶ R
x✝ : Cᵒᵖ
S : (J.Cover x✝.unop)ᵒᵖ
⊢ colimit.ι (J.diagram P x✝.unop) S ≫ (J.plusMap (η ≫ γ)).app x✝ =
    colimit.ι (J.diagram P x✝.unop) S ≫ (J.plusMap η ≫ J.plusMap γ).app x✝

tactic: simp [plusMap, J.diagramNatTrans_comp]
state_before: case w.h
C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝² : Category.{max v u, w} D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : J.Cover X), HasMultiequalizer (S.index P)
P✝ : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (J.Cover X)ᵒᵖ D
P Q R : Cᵒᵖ ⥤ D
η : P ⟶ Q
γ : Q ⟶ R
x✝ : Cᵒᵖ
S : (J.Cover x✝.unop)ᵒᵖ
⊢ colimit.ι (J.diagram P x✝.unop) S ≫ (J.plusMap (η ≫ γ)).app x✝ =
    colimit.ι (J.diagram P x✝.unop) S ≫ (J.plusMap η ≫ J.plusMap γ).app x✝
state_after: no goals
Theorem: CochainComplex.HomComplex.Cochain.rightShift_zero
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean

tactic: change rightShiftAddEquiv K L n a n' hn' 0 = 0
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
⊢ rightShift 0 a n' hn' = 0
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
⊢ (rightShiftAddEquiv K L n a n' hn') 0 = 0

tactic: apply _root_.map_zero
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
⊢ (rightShiftAddEquiv K L n a n' hn') 0 = 0
state_after: no goals
Theorem: List.count_cons
File: .lake/packages/batteries/Batteries/Data/List/Count.lean

tactic: simp [count, countP_cons, eq_comm (a := a)]
state_before: α : Type u_1
inst✝ : DecidableEq α
a b : α
l : List α
⊢ count a (b :: l) = count a l + if a = b then 1 else 0
state_after: no goals
Theorem: Finset.prod_erase_attach
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: rw [← Function.Embedding.coe_subtype, ← prod_map]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝¹ : CommMonoid α
inst✝ : DecidableEq ι
s : Finset ι
f : ι → α
i : { x // x ∈ s }
⊢ ∏ j ∈ s.attach.erase i, f ↑j = ∏ j ∈ s.erase ↑i, f j
state_after: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝¹ : CommMonoid α
inst✝ : DecidableEq ι
s : Finset ι
f : ι → α
i : { x // x ∈ s }
⊢ ∏ x ∈ map (Embedding.subtype fun x => x ∈ s) (s.attach.erase i), f x =
    ∏ j ∈ s.erase ((Embedding.subtype fun x => x ∈ s) i), f j

tactic: simp [attach_map_val]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝¹ : CommMonoid α
inst✝ : DecidableEq ι
s : Finset ι
f : ι → α
i : { x // x ∈ s }
⊢ ∏ x ∈ map (Embedding.subtype fun x => x ∈ s) (s.attach.erase i), f x =
    ∏ j ∈ s.erase ((Embedding.subtype fun x => x ∈ s) i), f j
state_after: no goals
Theorem: QuaternionAlgebra.coe_add
File: Mathlib/Algebra/Quaternion.lean

tactic: ext <;> simp
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝ : CommRing R
c₁ c₂ r x y z : R
a b c : ℍ[R,c₁,c₂]
⊢ ↑(x + y) = ↑x + ↑y
state_after: no goals
Theorem: SimpleGraph.induce_connected_of_patches
File: Mathlib/Combinatorics/SimpleGraph/Connectivity/Subgraph.lean

tactic: rw [connected_iff_exists_forall_reachable]
state_before: V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
s : Set V
u : V
hu : u ∈ s
patches : ∀ {v : V}, v ∈ s → ∃ s' ⊆ s, ∃ (hu' : u ∈ s') (hv' : v ∈ s'), (induce s' G).Reachable ⟨u, hu'⟩ ⟨v, hv'⟩
⊢ (induce s G).Connected
state_after: V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
s : Set V
u : V
hu : u ∈ s
patches : ∀ {v : V}, v ∈ s → ∃ s' ⊆ s, ∃ (hu' : u ∈ s') (hv' : v ∈ s'), (induce s' G).Reachable ⟨u, hu'⟩ ⟨v, hv'⟩
⊢ ∃ v, ∀ (w : ↑s), (induce s G).Reachable v w

tactic: refine ⟨⟨u, hu⟩, ?_⟩
state_before: V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
s : Set V
u : V
hu : u ∈ s
patches : ∀ {v : V}, v ∈ s → ∃ s' ⊆ s, ∃ (hu' : u ∈ s') (hv' : v ∈ s'), (induce s' G).Reachable ⟨u, hu'⟩ ⟨v, hv'⟩
⊢ ∃ v, ∀ (w : ↑s), (induce s G).Reachable v w
state_after: V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
s : Set V
u : V
hu : u ∈ s
patches : ∀ {v : V}, v ∈ s → ∃ s' ⊆ s, ∃ (hu' : u ∈ s') (hv' : v ∈ s'), (induce s' G).Reachable ⟨u, hu'⟩ ⟨v, hv'⟩
⊢ ∀ (w : ↑s), (induce s G).Reachable ⟨u, hu⟩ w

tactic: rintro ⟨v, hv⟩
state_before: V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
s : Set V
u : V
hu : u ∈ s
patches : ∀ {v : V}, v ∈ s → ∃ s' ⊆ s, ∃ (hu' : u ∈ s') (hv' : v ∈ s'), (induce s' G).Reachable ⟨u, hu'⟩ ⟨v, hv'⟩
⊢ ∀ (w : ↑s), (induce s G).Reachable ⟨u, hu⟩ w
state_after: case mk
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
s : Set V
u : V
hu : u ∈ s
patches : ∀ {v : V}, v ∈ s → ∃ s' ⊆ s, ∃ (hu' : u ∈ s') (hv' : v ∈ s'), (induce s' G).Reachable ⟨u, hu'⟩ ⟨v, hv'⟩
v : V
hv : v ∈ s
⊢ (induce s G).Reachable ⟨u, hu⟩ ⟨v, hv⟩

tactic: obtain ⟨sv, svs, hu', hv', uv⟩ := patches hv
state_before: case mk
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
s : Set V
u : V
hu : u ∈ s
patches : ∀ {v : V}, v ∈ s → ∃ s' ⊆ s, ∃ (hu' : u ∈ s') (hv' : v ∈ s'), (induce s' G).Reachable ⟨u, hu'⟩ ⟨v, hv'⟩
v : V
hv : v ∈ s
⊢ (induce s G).Reachable ⟨u, hu⟩ ⟨v, hv⟩
state_after: case mk.intro.intro.intro.intro
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
s : Set V
u : V
hu : u ∈ s
patches : ∀ {v : V}, v ∈ s → ∃ s' ⊆ s, ∃ (hu' : u ∈ s') (hv' : v ∈ s'), (induce s' G).Reachable ⟨u, hu'⟩ ⟨v, hv'⟩
v : V
hv : v ∈ s
sv : Set V
svs : sv ⊆ s
hu' : u ∈ sv
hv' : v ∈ sv
uv : (induce sv G).Reachable ⟨u, hu'⟩ ⟨v, hv'⟩
⊢ (induce s G).Reachable ⟨u, hu⟩ ⟨v, hv⟩

tactic: exact uv.map (induceHomOfLE _ svs).toHom
state_before: case mk.intro.intro.intro.intro
V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
s : Set V
u : V
hu : u ∈ s
patches : ∀ {v : V}, v ∈ s → ∃ s' ⊆ s, ∃ (hu' : u ∈ s') (hv' : v ∈ s'), (induce s' G).Reachable ⟨u, hu'⟩ ⟨v, hv'⟩
v : V
hv : v ∈ s
sv : Set V
svs : sv ⊆ s
hu' : u ∈ sv
hv' : v ∈ sv
uv : (induce sv G).Reachable ⟨u, hu'⟩ ⟨v, hv'⟩
⊢ (induce s G).Reachable ⟨u, hu⟩ ⟨v, hv⟩
state_after: no goals
Theorem: Submonoid.coe_iInf
File: Mathlib/Algebra/Group/Submonoid/Basic.lean

tactic: simp only [iInf, coe_sInf, Set.biInter_range]
state_before: M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s : Set M
inst✝ : AddZeroClass A
t : Set A
S✝ : Submonoid M
ι : Sort u_4
S : ι → Submonoid M
⊢ ↑(⨅ i, S i) = ⋂ i, ↑(S i)
state_after: no goals
Theorem: RelSeries.append_apply_left
File: Mathlib/Order/RelSeries.lean

tactic: dsimp
state_before: α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
i : Fin (p.length + 1)
⊢ p.length + 1 + (q.length + 1) = (p.append q connect).length + 1
state_after: α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
i : Fin (p.length + 1)
⊢ p.length + 1 + (q.length + 1) = p.length + q.length + 1 + 1

tactic: abel
state_before: α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
i : Fin (p.length + 1)
⊢ p.length + 1 + (q.length + 1) = p.length + q.length + 1 + 1
state_after: no goals

tactic: delta append
state_before: α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
i : Fin (p.length + 1)
⊢ (p.append q connect).toFun (Fin.cast ⋯ (Fin.castAdd (q.length + 1) i)) = p.toFun i
state_after: α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
i : Fin (p.length + 1)
⊢ { length := p.length + q.length + 1, toFun := Fin.append p.toFun q.toFun ∘ Fin.cast ⋯, step := ⋯ }.toFun
      (Fin.cast ⋯ (Fin.castAdd (q.length + 1) i)) =
    p.toFun i

tactic: simp only [Function.comp_apply]
state_before: α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
i : Fin (p.length + 1)
⊢ { length := p.length + q.length + 1, toFun := Fin.append p.toFun q.toFun ∘ Fin.cast ⋯, step := ⋯ }.toFun
      (Fin.cast ⋯ (Fin.castAdd (q.length + 1) i)) =
    p.toFun i
state_after: α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
i : Fin (p.length + 1)
⊢ Fin.append p.toFun q.toFun (Fin.cast ⋯ (Fin.cast ⋯ (Fin.castAdd (q.length + 1) i))) = p.toFun i

tactic: convert Fin.append_left _ _ _
state_before: α : Type u_1
r : Rel α α
β : Type u_2
s : Rel β β
p q : RelSeries r
connect : r p.last q.head
i : Fin (p.length + 1)
⊢ Fin.append p.toFun q.toFun (Fin.cast ⋯ (Fin.cast ⋯ (Fin.castAdd (q.length + 1) i))) = p.toFun i
state_after: no goals
Theorem: Polynomial.smeval_at_zero
File: Mathlib/Algebra/Polynomial/Smeval.lean

tactic: induction p using Polynomial.induction_on' with
| h_add p q ph qh =>
  simp_all only [smeval_add, coeff_add, add_smul]
| h_monomial n a =>
  cases n with
  | zero => simp only [Nat.zero_eq, monomial_zero_left, smeval_C, npow_zero, coeff_C_zero]
  | succ n => rw [coeff_monomial_succ, smeval_monomial, npow_add, npow_one, mul_zero, zero_smul,
      smul_zero]
state_before: R : Type u_1
inst✝⁶ : Semiring R
p✝ : R[X]
r : R
p q : R[X]
S : Type u_2
inst✝⁵ : NonAssocSemiring S
inst✝⁴ : Module R S
inst✝³ : IsScalarTower R S S
inst✝² : SMulCommClass R S S
inst✝¹ : Pow S ℕ
inst✝ : NatPowAssoc S
x : S
⊢ p.smeval 0 = p.coeff 0 • 1
state_after: no goals

tactic: simp_all only [smeval_add, coeff_add, add_smul]
state_before: case h_add
R : Type u_1
inst✝⁶ : Semiring R
p✝¹ : R[X]
r : R
p✝ q✝ : R[X]
S : Type u_2
inst✝⁵ : NonAssocSemiring S
inst✝⁴ : Module R S
inst✝³ : IsScalarTower R S S
inst✝² : SMulCommClass R S S
inst✝¹ : Pow S ℕ
inst✝ : NatPowAssoc S
x : S
p q : R[X]
ph : p.smeval 0 = p.coeff 0 • 1
qh : q.smeval 0 = q.coeff 0 • 1
⊢ (p + q).smeval 0 = (p + q).coeff 0 • 1
state_after: no goals

tactic: cases n with
| zero => simp only [Nat.zero_eq, monomial_zero_left, smeval_C, npow_zero, coeff_C_zero]
| succ n => rw [coeff_monomial_succ, smeval_monomial, npow_add, npow_one, mul_zero, zero_smul,
    smul_zero]
state_before: case h_monomial
R : Type u_1
inst✝⁶ : Semiring R
p✝ : R[X]
r : R
p q : R[X]
S : Type u_2
inst✝⁵ : NonAssocSemiring S
inst✝⁴ : Module R S
inst✝³ : IsScalarTower R S S
inst✝² : SMulCommClass R S S
inst✝¹ : Pow S ℕ
inst✝ : NatPowAssoc S
x : S
n : ℕ
a : R
⊢ ((monomial n) a).smeval 0 = ((monomial n) a).coeff 0 • 1
state_after: no goals

tactic: simp only [Nat.zero_eq, monomial_zero_left, smeval_C, npow_zero, coeff_C_zero]
state_before: case h_monomial.zero
R : Type u_1
inst✝⁶ : Semiring R
p✝ : R[X]
r : R
p q : R[X]
S : Type u_2
inst✝⁵ : NonAssocSemiring S
inst✝⁴ : Module R S
inst✝³ : IsScalarTower R S S
inst✝² : SMulCommClass R S S
inst✝¹ : Pow S ℕ
inst✝ : NatPowAssoc S
x : S
a : R
⊢ ((monomial 0) a).smeval 0 = ((monomial 0) a).coeff 0 • 1
state_after: no goals

tactic: rw [coeff_monomial_succ, smeval_monomial, npow_add, npow_one, mul_zero, zero_smul,
smul_zero]
state_before: case h_monomial.succ
R : Type u_1
inst✝⁶ : Semiring R
p✝ : R[X]
r : R
p q : R[X]
S : Type u_2
inst✝⁵ : NonAssocSemiring S
inst✝⁴ : Module R S
inst✝³ : IsScalarTower R S S
inst✝² : SMulCommClass R S S
inst✝¹ : Pow S ℕ
inst✝ : NatPowAssoc S
x : S
a : R
n : ℕ
⊢ ((monomial (n + 1)) a).smeval 0 = ((monomial (n + 1)) a).coeff 0 • 1
state_after: no goals
Theorem: Cardinal.not_irreducible_of_aleph0_le
File: Mathlib/SetTheory/Cardinal/Divisibility.lean

tactic: rw [irreducible_iff, not_and_or]
state_before: a b : Cardinal.{u}
n m : ℕ
ha : ℵ₀ ≤ a
⊢ ¬Irreducible a
state_after: a b : Cardinal.{u}
n m : ℕ
ha : ℵ₀ ≤ a
⊢ ¬¬IsUnit a ∨ ¬∀ (a_1 b : Cardinal.{u}), a = a_1 * b → IsUnit a_1 ∨ IsUnit b

tactic: refine Or.inr fun h => ?_
state_before: a b : Cardinal.{u}
n m : ℕ
ha : ℵ₀ ≤ a
⊢ ¬¬IsUnit a ∨ ¬∀ (a_1 b : Cardinal.{u}), a = a_1 * b → IsUnit a_1 ∨ IsUnit b
state_after: a b : Cardinal.{u}
n m : ℕ
ha : ℵ₀ ≤ a
h : ∀ (a_1 b : Cardinal.{u}), a = a_1 * b → IsUnit a_1 ∨ IsUnit b
⊢ False

tactic: simpa [mul_aleph0_eq ha, isUnit_iff, (one_lt_aleph0.trans_le ha).ne', one_lt_aleph0.ne'] using
  h a ℵ₀
state_before: a b : Cardinal.{u}
n m : ℕ
ha : ℵ₀ ≤ a
h : ∀ (a_1 b : Cardinal.{u}), a = a_1 * b → IsUnit a_1 ∨ IsUnit b
⊢ False
state_after: no goals
Theorem: PartialHomeomorph.IsImage.iff_symm_preimage_eq'
File: Mathlib/Topology/PartialHomeomorph.lean

tactic: rw [iff_symm_preimage_eq, ← image_source_inter_eq, ← image_source_inter_eq']
state_before: X : Type u_1
X' : Type u_2
Y : Type u_3
Y' : Type u_4
Z : Type u_5
Z' : Type u_6
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace X'
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Y'
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace Z'
e : PartialHomeomorph X Y
s : Set X
t : Set Y
x : X
y : Y
⊢ e.IsImage s t ↔ e.target ∩ ↑e.symm ⁻¹' (e.source ∩ s) = e.target ∩ t
state_after: no goals
Theorem: continuous_circleMap_inv
File: Mathlib/MeasureTheory/Integral/CircleIntegral.lean

tactic: have : ∀ θ, circleMap z R θ - w ≠ 0 := by
  simp_rw [sub_ne_zero]
  exact fun θ => circleMap_ne_mem_ball hw θ
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
R : ℝ
z w : ℂ
hw : w ∈ ball z R
⊢ Continuous fun θ => (circleMap z R θ - w)⁻¹
state_after: E : Type u_1
inst✝ : NormedAddCommGroup E
R : ℝ
z w : ℂ
hw : w ∈ ball z R
this : ∀ (θ : ℝ), circleMap z R θ - w ≠ 0
⊢ Continuous fun θ => (circleMap z R θ - w)⁻¹

tactic: exact Continuous.inv₀ (by fun_prop) this
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
R : ℝ
z w : ℂ
hw : w ∈ ball z R
this : ∀ (θ : ℝ), circleMap z R θ - w ≠ 0
⊢ Continuous fun θ => (circleMap z R θ - w)⁻¹
state_after: no goals

tactic: simp_rw [sub_ne_zero]
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
R : ℝ
z w : ℂ
hw : w ∈ ball z R
⊢ ∀ (θ : ℝ), circleMap z R θ - w ≠ 0
state_after: E : Type u_1
inst✝ : NormedAddCommGroup E
R : ℝ
z w : ℂ
hw : w ∈ ball z R
⊢ ∀ (θ : ℝ), circleMap z R θ ≠ w

tactic: exact fun θ => circleMap_ne_mem_ball hw θ
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
R : ℝ
z w : ℂ
hw : w ∈ ball z R
⊢ ∀ (θ : ℝ), circleMap z R θ ≠ w
state_after: no goals

tactic: fun_prop
state_before: E : Type u_1
inst✝ : NormedAddCommGroup E
R : ℝ
z w : ℂ
hw : w ∈ ball z R
this : ∀ (θ : ℝ), circleMap z R θ - w ≠ 0
⊢ Continuous fun θ => circleMap z R θ - w
state_after: no goals