1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: TrivSqZeroExt.eq_smul_exp_of_invertible
File: Mathlib/Analysis/NormedSpace/TrivSqZeroExt.lean

tactic: rw [← inr_smul, exp_inr, smul_add, ← inl_one, ← inl_smul, ← inr_smul, smul_eq_mul, mul_one,
  smul_smul, mul_invOf_self, one_smul, inl_fst_add_inr_snd_eq]
state_before: 𝕜 : Type u_1
S : Type u_2
R : Type u_3
M : Type u_4
inst✝¹⁸ : Field 𝕜
inst✝¹⁷ : CharZero 𝕜
inst✝¹⁶ : CommRing R
inst✝¹⁵ : AddCommGroup M
inst✝¹⁴ : Algebra 𝕜 R
inst✝¹³ : Module 𝕜 M
inst✝¹² : Module R M
inst✝¹¹ : Module Rᵐᵒᵖ M
inst✝¹⁰ : IsCentralScalar R M
inst✝⁹ : IsScalarTower 𝕜 R M
inst✝⁸ : TopologicalSpace R
inst✝⁷ : TopologicalSpace M
inst✝⁶ : TopologicalRing R
inst✝⁵ : TopologicalAddGroup M
inst✝⁴ : ContinuousSMul R M
inst✝³ : ContinuousSMul Rᵐᵒᵖ M
inst✝² : T2Space R
inst✝¹ : T2Space M
x : tsze R M
inst✝ : Invertible x.fst
⊢ x = x.fst • exp 𝕜 (⅟x.fst • inr x.snd)
state_after: no goals
Theorem: MeasurableEquiv.measurableSet_image
File: Mathlib/MeasureTheory/MeasurableSpace/Embedding.lean

tactic: rw [image_eq_preimage, measurableSet_preimage]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
e : α ≃ᵐ β
⊢ MeasurableSet (⇑e '' s) ↔ MeasurableSet s
state_after: no goals
Theorem: CstarRing.norm_mul_coe_unitary
File: Mathlib/Analysis/NormedSpace/Star/Basic.lean

tactic: simp only [star_star, star_mul]
state_before: 𝕜 : Type u_1
E : Type u_2
α : Type u_3
inst✝² : NormedRing E
inst✝¹ : StarRing E
inst✝ : CstarRing E
A : E
U : ↥(unitary E)
⊢ ‖A * ↑U‖ = ‖((↑U)⋆ * A⋆)⋆‖
state_after: no goals

tactic: rw [norm_star]
state_before: 𝕜 : Type u_1
E : Type u_2
α : Type u_3
inst✝² : NormedRing E
inst✝¹ : StarRing E
inst✝ : CstarRing E
A : E
U : ↥(unitary E)
⊢ ‖((↑U)⋆ * A⋆)⋆‖ = ‖(↑U)⋆ * A⋆‖
state_after: no goals
Theorem: List.length_pmap
File: Mathlib/Data/List/Basic.lean

tactic: induction l <;> [rfl; simp only [*, pmap, length]]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p : α → Prop
f : (a : α) → p a → β
l : List α
H : ∀ (a : α), a ∈ l → p a
⊢ (pmap f l H).length = l.length
state_after: no goals
Theorem: RatFunc.num_eq_zero_iff
File: Mathlib/FieldTheory/RatFunc/Basic.lean

tactic: rw [← num_div_denom x, h, RingHom.map_zero, zero_div]
state_before: K : Type u
inst✝ : Field K
x : RatFunc K
h : x.num = 0
⊢ x = 0
state_after: no goals
Theorem: Matrix.one_hadamard
File: Mathlib/Data/Matrix/Hadamard.lean

tactic: ext i j
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
m : Type u_4
n : Type u_5
R : Type u_6
A B C : Matrix m n α
inst✝¹ : DecidableEq n
inst✝ : MulZeroOneClass α
M : Matrix n n α
⊢ 1 ⊙ M = diagonal fun i => M i i
state_after: case a
α : Type u_1
β : Type u_2
γ : Type u_3
m : Type u_4
n : Type u_5
R : Type u_6
A B C : Matrix m n α
inst✝¹ : DecidableEq n
inst✝ : MulZeroOneClass α
M : Matrix n n α
i j : n
⊢ (1 ⊙ M) i j = diagonal (fun i => M i i) i j

tactic: by_cases h : i = j <;> simp [h]
state_before: case a
α : Type u_1
β : Type u_2
γ : Type u_3
m : Type u_4
n : Type u_5
R : Type u_6
A B C : Matrix m n α
inst✝¹ : DecidableEq n
inst✝ : MulZeroOneClass α
M : Matrix n n α
i j : n
⊢ (1 ⊙ M) i j = diagonal (fun i => M i i) i j
state_after: no goals
Theorem: Polynomial.X_eq_normalize
File: Mathlib/Algebra/Polynomial/FieldDivision.lean

tactic: simp only [normalize_apply, normUnit_X, Units.val_one, mul_one]
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizationMonoid R
⊢ X = normalize X
state_after: no goals
Theorem: HNNExtension.lift_t
File: Mathlib/GroupTheory/HNNExtension.lean

tactic: simp [lift, t]
state_before: G : Type u_1
inst✝² : Group G
A B : Subgroup G
φ : ↥A ≃* ↥B
H : Type u_2
inst✝¹ : Group H
M : Type u_3
inst✝ : Monoid M
f : G →* H
x : H
hx : ∀ (a : ↥A), x * f ↑a = f ↑(φ a) * x
⊢ (lift f x hx) t = x
state_after: no goals
Theorem: NumberField.mixedEmbedding.commMap_canonical_eq_mixed
File: Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean

tactic: simp only [canonicalEmbedding, commMap, LinearMap.coe_mk, AddHom.coe_mk, Pi.ringHom_apply,
  mixedEmbedding, RingHom.prod_apply, Prod.mk.injEq]
state_before: K : Type u_1
inst✝ : Field K
x : K
⊢ (commMap K) ((canonicalEmbedding K) x) = (mixedEmbedding K) x
state_after: K : Type u_1
inst✝ : Field K
x : K
⊢ (fun w => ((↑w).embedding x).re) = (Pi.ringHom fun w => embedding_of_isReal ⋯) x ∧
    (fun w => (↑w).embedding x) = (Pi.ringHom fun w => (↑w).embedding) x

tactic: exact ⟨rfl, rfl⟩
state_before: K : Type u_1
inst✝ : Field K
x : K
⊢ (fun w => ((↑w).embedding x).re) = (Pi.ringHom fun w => embedding_of_isReal ⋯) x ∧
    (fun w => (↑w).embedding x) = (Pi.ringHom fun w => (↑w).embedding) x
state_after: no goals
Theorem: Part.some_union_some
File: Mathlib/Data/Part.lean

tactic: simp [union_def]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Union α
a b : α
⊢ some a ∪ some b = some (a ∪ b)
state_after: no goals
Theorem: HomogeneousLocalization.val_intCast
File: Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean

tactic: cases n <;> simp [Int.castDef, *]
state_before: ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
n : ℤ
⊢ n.castDef.val = ↑n
state_after: no goals
Theorem: Lagrange.eq_interpolate_iff
File: Mathlib/LinearAlgebra/Lagrange.lean

tactic: constructor <;> intro h
state_before: F : Type u_1
inst✝¹ : Field F
ι : Type u_2
inst✝ : DecidableEq ι
s t : Finset ι
i j : ι
v r r' : ι → F
f : F[X]
hvs : Set.InjOn v ↑s
⊢ (f.degree < ↑s.card ∧ ∀ i ∈ s, eval (v i) f = r i) ↔ f = (interpolate s v) r
state_after: case mp
F : Type u_1
inst✝¹ : Field F
ι : Type u_2
inst✝ : DecidableEq ι
s t : Finset ι
i j : ι
v r r' : ι → F
f : F[X]
hvs : Set.InjOn v ↑s
h : f.degree < ↑s.card ∧ ∀ i ∈ s, eval (v i) f = r i
⊢ f = (interpolate s v) r

case mpr
F : Type u_1
inst✝¹ : Field F
ι : Type u_2
inst✝ : DecidableEq ι
s t : Finset ι
i j : ι
v r r' : ι → F
f : F[X]
hvs : Set.InjOn v ↑s
h : f = (interpolate s v) r
⊢ f.degree < ↑s.card ∧ ∀ i ∈ s, eval (v i) f = r i

tactic: exact eq_interpolate_of_eval_eq _ hvs h.1 h.2
state_before: case mp
F : Type u_1
inst✝¹ : Field F
ι : Type u_2
inst✝ : DecidableEq ι
s t : Finset ι
i j : ι
v r r' : ι → F
f : F[X]
hvs : Set.InjOn v ↑s
h : f.degree < ↑s.card ∧ ∀ i ∈ s, eval (v i) f = r i
⊢ f = (interpolate s v) r
state_after: no goals

tactic: rw [h]
state_before: case mpr
F : Type u_1
inst✝¹ : Field F
ι : Type u_2
inst✝ : DecidableEq ι
s t : Finset ι
i j : ι
v r r' : ι → F
f : F[X]
hvs : Set.InjOn v ↑s
h : f = (interpolate s v) r
⊢ f.degree < ↑s.card ∧ ∀ i ∈ s, eval (v i) f = r i
state_after: case mpr
F : Type u_1
inst✝¹ : Field F
ι : Type u_2
inst✝ : DecidableEq ι
s t : Finset ι
i j : ι
v r r' : ι → F
f : F[X]
hvs : Set.InjOn v ↑s
h : f = (interpolate s v) r
⊢ ((interpolate s v) r).degree < ↑s.card ∧ ∀ i ∈ s, eval (v i) ((interpolate s v) r) = r i

tactic: exact ⟨degree_interpolate_lt _ hvs, fun _ hi => eval_interpolate_at_node _ hvs hi⟩
state_before: case mpr
F : Type u_1
inst✝¹ : Field F
ι : Type u_2
inst✝ : DecidableEq ι
s t : Finset ι
i j : ι
v r r' : ι → F
f : F[X]
hvs : Set.InjOn v ↑s
h : f = (interpolate s v) r
⊢ ((interpolate s v) r).degree < ↑s.card ∧ ∀ i ∈ s, eval (v i) ((interpolate s v) r) = r i
state_after: no goals
Theorem: CategoryTheory.Limits.Pi.map'_eq
File: Mathlib/CategoryTheory/Limits/Shapes/Products.lean

tactic: aesop_cat
state_before: β : Type w
α : Type w₂
γ : Type w₃
C : Type u
inst✝² : Category.{v, u} C
f : α → C
g : β → C
inst✝¹ : HasProduct f
inst✝ : HasProduct g
p p' : β → α
q : (b : β) → f (p b) ⟶ g b
q' : (b : β) → f (p' b) ⟶ g b
hp : p = p'
hq : ∀ (b : β), eqToHom ⋯ ≫ q b = q' b
⊢ map' p q = map' p' q'
state_after: no goals
Theorem: IsFractional.inf_right
File: Mathlib/RingTheory/FractionalIdeal/Basic.lean

tactic: rcases mem_inf.mp hb with ⟨hbI, _⟩
state_before: R : Type u_1
inst✝² : CommRing R
S : Submonoid R
P : Type u_2
inst✝¹ : CommRing P
inst✝ : Algebra R P
loc : IsLocalization S P
I : Submodule R P
aI : R
haI : aI ∈ S
hI : ∀ b ∈ I, IsInteger R (aI • b)
J : Submodule R P
b : P
hb : b ∈ I ⊓ J
⊢ IsInteger R (aI • b)
state_after: case intro
R : Type u_1
inst✝² : CommRing R
S : Submonoid R
P : Type u_2
inst✝¹ : CommRing P
inst✝ : Algebra R P
loc : IsLocalization S P
I : Submodule R P
aI : R
haI : aI ∈ S
hI : ∀ b ∈ I, IsInteger R (aI • b)
J : Submodule R P
b : P
hb : b ∈ I ⊓ J
hbI : b ∈ I
right✝ : b ∈ J
⊢ IsInteger R (aI • b)

tactic: exact hI b hbI
state_before: case intro
R : Type u_1
inst✝² : CommRing R
S : Submonoid R
P : Type u_2
inst✝¹ : CommRing P
inst✝ : Algebra R P
loc : IsLocalization S P
I : Submodule R P
aI : R
haI : aI ∈ S
hI : ∀ b ∈ I, IsInteger R (aI • b)
J : Submodule R P
b : P
hb : b ∈ I ⊓ J
hbI : b ∈ I
right✝ : b ∈ J
⊢ IsInteger R (aI • b)
state_after: no goals
Theorem: Complex.abs_mul_exp_arg_mul_I
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: rcases eq_or_ne x 0 with (rfl | hx)
state_before: a x✝ z x : ℂ
⊢ ↑(abs x) * cexp (↑x.arg * I) = x
state_after: case inl
a x z : ℂ
⊢ ↑(abs 0) * cexp (↑(arg 0) * I) = 0

case inr
a x✝ z x : ℂ
hx : x ≠ 0
⊢ ↑(abs x) * cexp (↑x.arg * I) = x

tactic: simp
state_before: case inl
a x z : ℂ
⊢ ↑(abs 0) * cexp (↑(arg 0) * I) = 0
state_after: no goals

tactic: have : abs x ≠ 0 := abs.ne_zero hx
state_before: case inr
a x✝ z x : ℂ
hx : x ≠ 0
⊢ ↑(abs x) * cexp (↑x.arg * I) = x
state_after: case inr
a x✝ z x : ℂ
hx : x ≠ 0
this : abs x ≠ 0
⊢ ↑(abs x) * cexp (↑x.arg * I) = x

tactic: apply Complex.ext <;> field_simp [sin_arg, cos_arg hx, this, mul_comm (abs x)]
state_before: case inr
a x✝ z x : ℂ
hx : x ≠ 0
this : abs x ≠ 0
⊢ ↑(abs x) * cexp (↑x.arg * I) = x
state_after: no goals
Theorem: tendsto_floor_left_pure_sub_one
File: Mathlib/Topology/Algebra/Order/Floor.lean

tactic: simpa only [ceil_intCast] using tendsto_floor_left_pure_ceil_sub_one (n : α)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : LinearOrderedRing α
inst✝² : FloorRing α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
n : ℤ
⊢ Tendsto floor (𝓝[<] ↑n) (pure (n - 1))
state_after: no goals
Theorem: Sum.getRight?_eq_some_iff
File: .lake/packages/batteries/Batteries/Data/Sum/Lemmas.lean

tactic: cases x <;> simp only [getRight?, Option.some.injEq, inr.injEq]
state_before: β✝ : Type u_1
b : β✝
α✝ : Type u_2
x : α✝ ⊕ β✝
⊢ x.getRight? = some b ↔ x = inr b
state_after: no goals
Theorem: Complex.arg_mul_coe_angle
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: convert arg_mul_cos_add_sin_mul_I_coe_angle (mul_pos (abs.pos hx) (abs.pos hy))
    (arg x + arg y : Real.Angle) using
  3
state_before: a x✝ z x y : ℂ
hx : x ≠ 0
hy : y ≠ 0
⊢ ↑(x * y).arg = ↑x.arg + ↑y.arg
state_after: case h.e'_2.h.e'_1.h.e'_1
a x✝ z x y : ℂ
hx : x ≠ 0
hy : y ≠ 0
⊢ x * y = ↑(abs x * abs y) * (↑(↑x.arg + ↑y.arg).cos + ↑(↑x.arg + ↑y.arg).sin * I)

tactic: simp_rw [← Real.Angle.coe_add, Real.Angle.sin_coe, Real.Angle.cos_coe, ofReal_cos, ofReal_sin,
  cos_add_sin_I, ofReal_add, add_mul, exp_add, ofReal_mul]
state_before: case h.e'_2.h.e'_1.h.e'_1
a x✝ z x y : ℂ
hx : x ≠ 0
hy : y ≠ 0
⊢ x * y = ↑(abs x * abs y) * (↑(↑x.arg + ↑y.arg).cos + ↑(↑x.arg + ↑y.arg).sin * I)
state_after: case h.e'_2.h.e'_1.h.e'_1
a x✝ z x y : ℂ
hx : x ≠ 0
hy : y ≠ 0
⊢ x * y = ↑(abs x) * ↑(abs y) * (cexp (↑x.arg * I) * cexp (↑y.arg * I))

tactic: rw [mul_assoc, mul_comm (exp _), ← mul_assoc (abs y : ℂ), abs_mul_exp_arg_mul_I, mul_comm y, ←
  mul_assoc, abs_mul_exp_arg_mul_I]
state_before: case h.e'_2.h.e'_1.h.e'_1
a x✝ z x y : ℂ
hx : x ≠ 0
hy : y ≠ 0
⊢ x * y = ↑(abs x) * ↑(abs y) * (cexp (↑x.arg * I) * cexp (↑y.arg * I))
state_after: no goals
Theorem: image_range_orderOf
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: ext x
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝² : Group G
inst✝¹ : Fintype G
x : G
n : ℕ
inst✝ : DecidableEq G
⊢ Finset.image (fun i => x ^ i) (Finset.range (orderOf x)) = (↑(zpowers x)).toFinset
state_after: case a
G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝² : Group G
inst✝¹ : Fintype G
x✝ : G
n : ℕ
inst✝ : DecidableEq G
x : G
⊢ x ∈ Finset.image (fun i => x✝ ^ i) (Finset.range (orderOf x✝)) ↔ x ∈ (↑(zpowers x✝)).toFinset

tactic: rw [Set.mem_toFinset, SetLike.mem_coe, mem_zpowers_iff_mem_range_orderOf]
state_before: case a
G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝² : Group G
inst✝¹ : Fintype G
x✝ : G
n : ℕ
inst✝ : DecidableEq G
x : G
⊢ x ∈ Finset.image (fun i => x✝ ^ i) (Finset.range (orderOf x✝)) ↔ x ∈ (↑(zpowers x✝)).toFinset
state_after: no goals
Theorem: ENNReal.mul_sub
File: Mathlib/Data/ENNReal/Operations.lean

tactic: simp only [mul_comm a]
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
h : 0 < c → c < b → a ≠ ⊤
⊢ a * (b - c) = a * b - a * c
state_after: a b c d : ℝ≥0∞
r p q : ℝ≥0
h : 0 < c → c < b → a ≠ ⊤
⊢ (b - c) * a = b * a - c * a

tactic: exact sub_mul h
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
h : 0 < c → c < b → a ≠ ⊤
⊢ (b - c) * a = b * a - c * a
state_after: no goals
Theorem: vectorSpan_range_eq_span_range_vsub_left
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: rw [vectorSpan_eq_span_vsub_set_left k (Set.mem_range_self i0), ← Set.range_comp]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
i0 : ι
⊢ vectorSpan k (range p) = Submodule.span k (range fun i => p i0 -ᵥ p i)
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
i0 : ι
⊢ Submodule.span k (range ((fun x => p i0 -ᵥ x) ∘ p)) = Submodule.span k (range fun i => p i0 -ᵥ p i)

tactic: congr
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
i0 : ι
⊢ Submodule.span k (range ((fun x => p i0 -ᵥ x) ∘ p)) = Submodule.span k (range fun i => p i0 -ᵥ p i)
state_after: no goals
Theorem: Path.refl_trans_refl
File: Mathlib/Topology/Connected/PathConnected.lean

tactic: ext
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
γ : Path x y
a : X
⊢ (refl a).trans (refl a) = refl a
state_after: case a.h
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
γ : Path x y
a : X
x✝ : ↑I
⊢ ((refl a).trans (refl a)) x✝ = (refl a) x✝

tactic: simp only [Path.trans, ite_self, one_div, Path.refl_extend]
state_before: case a.h
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
γ : Path x y
a : X
x✝ : ↑I
⊢ ((refl a).trans (refl a)) x✝ = (refl a) x✝
state_after: case a.h
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
γ : Path x y
a : X
x✝ : ↑I
⊢ { toFun := (fun t => a) ∘ Subtype.val, continuous_toFun := ⋯, source' := ⋯, target' := ⋯ } x✝ = (refl a) x✝

tactic: rfl
state_before: case a.h
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
γ : Path x y
a : X
x✝ : ↑I
⊢ { toFun := (fun t => a) ∘ Subtype.val, continuous_toFun := ⋯, source' := ⋯, target' := ⋯ } x✝ = (refl a) x✝
state_after: no goals
Theorem: IsPreconnected.eq_one_or_eq_neg_one_of_sq_eq
File: Mathlib/Topology/Algebra/Field.lean

tactic: have : DiscreteTopology ({1, -1} : Set 𝕜) := discrete_of_t1_of_finite
state_before: K : Type u_1
inst✝⁶ : DivisionRing K
inst✝⁵ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace 𝕜
inst✝² : T1Space 𝕜
inst✝¹ : Ring 𝕜
inst✝ : NoZeroDivisors 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hsq : EqOn (f ^ 2) 1 S
⊢ EqOn f 1 S ∨ EqOn f (-1) S
state_after: K : Type u_1
inst✝⁶ : DivisionRing K
inst✝⁵ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace 𝕜
inst✝² : T1Space 𝕜
inst✝¹ : Ring 𝕜
inst✝ : NoZeroDivisors 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hsq : EqOn (f ^ 2) 1 S
this : DiscreteTopology ↑{1, -1}
⊢ EqOn f 1 S ∨ EqOn f (-1) S

tactic: have hmaps : MapsTo f S {1, -1} := by
  simpa only [EqOn, Pi.one_apply, Pi.pow_apply, sq_eq_one_iff] using hsq
state_before: K : Type u_1
inst✝⁶ : DivisionRing K
inst✝⁵ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace 𝕜
inst✝² : T1Space 𝕜
inst✝¹ : Ring 𝕜
inst✝ : NoZeroDivisors 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hsq : EqOn (f ^ 2) 1 S
this : DiscreteTopology ↑{1, -1}
⊢ EqOn f 1 S ∨ EqOn f (-1) S
state_after: K : Type u_1
inst✝⁶ : DivisionRing K
inst✝⁵ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace 𝕜
inst✝² : T1Space 𝕜
inst✝¹ : Ring 𝕜
inst✝ : NoZeroDivisors 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hsq : EqOn (f ^ 2) 1 S
this : DiscreteTopology ↑{1, -1}
hmaps : MapsTo f S {1, -1}
⊢ EqOn f 1 S ∨ EqOn f (-1) S

tactic: simpa using hS.eqOn_const_of_mapsTo hf hmaps
state_before: K : Type u_1
inst✝⁶ : DivisionRing K
inst✝⁵ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace 𝕜
inst✝² : T1Space 𝕜
inst✝¹ : Ring 𝕜
inst✝ : NoZeroDivisors 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hsq : EqOn (f ^ 2) 1 S
this : DiscreteTopology ↑{1, -1}
hmaps : MapsTo f S {1, -1}
⊢ EqOn f 1 S ∨ EqOn f (-1) S
state_after: no goals

tactic: simpa only [EqOn, Pi.one_apply, Pi.pow_apply, sq_eq_one_iff] using hsq
state_before: K : Type u_1
inst✝⁶ : DivisionRing K
inst✝⁵ : TopologicalSpace K
α : Type u_2
𝕜 : Type u_3
f g : α → 𝕜
S : Set α
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace 𝕜
inst✝² : T1Space 𝕜
inst✝¹ : Ring 𝕜
inst✝ : NoZeroDivisors 𝕜
hS : IsPreconnected S
hf : ContinuousOn f S
hsq : EqOn (f ^ 2) 1 S
this : DiscreteTopology ↑{1, -1}
⊢ MapsTo f S {1, -1}
state_after: no goals
Theorem: Ordinal.CNF_fst_le_log
File: Mathlib/SetTheory/Ordinal/CantorNormalForm.lean

tactic: refine CNFRec b ?_ (fun o ho H ↦ ?_) o
state_before: b o : Ordinal.{u}
x : Ordinal.{u} × Ordinal.{u}
⊢ x ∈ CNF b o → x.1 ≤ log b o
state_after: case refine_1
b o : Ordinal.{u}
x : Ordinal.{u} × Ordinal.{u}
⊢ x ∈ CNF b 0 → x.1 ≤ log b 0

case refine_2
b o✝ : Ordinal.{u}
x : Ordinal.{u} × Ordinal.{u}
o : Ordinal.{u}
ho : o ≠ 0
H : x ∈ CNF b (o % b ^ log b o) → x.1 ≤ log b (o % b ^ log b o)
⊢ x ∈ CNF b o → x.1 ≤ log b o

tactic: rw [CNF_zero]
state_before: case refine_1
b o : Ordinal.{u}
x : Ordinal.{u} × Ordinal.{u}
⊢ x ∈ CNF b 0 → x.1 ≤ log b 0
state_after: case refine_1
b o : Ordinal.{u}
x : Ordinal.{u} × Ordinal.{u}
⊢ x ∈ [] → x.1 ≤ log b 0

tactic: intro contra
state_before: case refine_1
b o : Ordinal.{u}
x : Ordinal.{u} × Ordinal.{u}
⊢ x ∈ [] → x.1 ≤ log b 0
state_after: case refine_1
b o : Ordinal.{u}
x : Ordinal.{u} × Ordinal.{u}
contra : x ∈ []
⊢ x.1 ≤ log b 0

tactic: contradiction
state_before: case refine_1
b o : Ordinal.{u}
x : Ordinal.{u} × Ordinal.{u}
contra : x ∈ []
⊢ x.1 ≤ log b 0
state_after: no goals

tactic: rw [CNF_ne_zero ho, mem_cons]
state_before: case refine_2
b o✝ : Ordinal.{u}
x : Ordinal.{u} × Ordinal.{u}
o : Ordinal.{u}
ho : o ≠ 0
H : x ∈ CNF b (o % b ^ log b o) → x.1 ≤ log b (o % b ^ log b o)
⊢ x ∈ CNF b o → x.1 ≤ log b o
state_after: case refine_2
b o✝ : Ordinal.{u}
x : Ordinal.{u} × Ordinal.{u}
o : Ordinal.{u}
ho : o ≠ 0
H : x ∈ CNF b (o % b ^ log b o) → x.1 ≤ log b (o % b ^ log b o)
⊢ x = (log b o, o / b ^ log b o) ∨ x ∈ CNF b (o % b ^ log b o) → x.1 ≤ log b o

tactic: rintro (rfl | h)
state_before: case refine_2
b o✝ : Ordinal.{u}
x : Ordinal.{u} × Ordinal.{u}
o : Ordinal.{u}
ho : o ≠ 0
H : x ∈ CNF b (o % b ^ log b o) → x.1 ≤ log b (o % b ^ log b o)
⊢ x = (log b o, o / b ^ log b o) ∨ x ∈ CNF b (o % b ^ log b o) → x.1 ≤ log b o
state_after: case refine_2.inl
b o✝ o : Ordinal.{u}
ho : o ≠ 0
H : (log b o, o / b ^ log b o) ∈ CNF b (o % b ^ log b o) → (log b o, o / b ^ log b o).1 ≤ log b (o % b ^ log b o)
⊢ (log b o, o / b ^ log b o).1 ≤ log b o

case refine_2.inr
b o✝ : Ordinal.{u}
x : Ordinal.{u} × Ordinal.{u}
o : Ordinal.{u}
ho : o ≠ 0
H : x ∈ CNF b (o % b ^ log b o) → x.1 ≤ log b (o % b ^ log b o)
h : x ∈ CNF b (o % b ^ log b o)
⊢ x.1 ≤ log b o

tactic: exact le_rfl
state_before: case refine_2.inl
b o✝ o : Ordinal.{u}
ho : o ≠ 0
H : (log b o, o / b ^ log b o) ∈ CNF b (o % b ^ log b o) → (log b o, o / b ^ log b o).1 ≤ log b (o % b ^ log b o)
⊢ (log b o, o / b ^ log b o).1 ≤ log b o
state_after: no goals

tactic: exact (H h).trans (log_mono_right _ (mod_opow_log_lt_self b ho).le)
state_before: case refine_2.inr
b o✝ : Ordinal.{u}
x : Ordinal.{u} × Ordinal.{u}
o : Ordinal.{u}
ho : o ≠ 0
H : x ∈ CNF b (o % b ^ log b o) → x.1 ≤ log b (o % b ^ log b o)
h : x ∈ CNF b (o % b ^ log b o)
⊢ x.1 ≤ log b o
state_after: no goals
Theorem: ne_zero_of_one_div_ne_zero
File: Mathlib/Algebra/GroupWithZero/Basic.lean

tactic: rw [ha, div_zero] at h
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝ : GroupWithZero G₀
a✝ b c a : G₀
h : 1 / a ≠ 0
ha : a = 0
⊢ False
state_after: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝ : GroupWithZero G₀
a✝ b c a : G₀
h : 0 ≠ 0
ha : a = 0
⊢ False

tactic: contradiction
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝ : GroupWithZero G₀
a✝ b c a : G₀
h : 0 ≠ 0
ha : a = 0
⊢ False
state_after: no goals
Theorem: tprod_eq_zero_mul'
File: Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean

tactic: simpa only [prod_range_one] using (prod_mul_tprod_nat_mul' hf).symm
state_before: M : Type u_1
inst✝⁴ : CommMonoid M
inst✝³ : TopologicalSpace M
m m' : M
G : Type u_2
inst✝² : CommGroup G
g g' : G
inst✝¹ : T2Space M
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : ContinuousMul M
f : ℕ → M
hf : Multipliable fun n => f (n + 1)
⊢ ∏' (b : ℕ), f b = f 0 * ∏' (b : ℕ), f (b + 1)
state_after: no goals
Theorem: WithTop.preimage_coe_Ioo
File: Mathlib/Order/Interval/Set/WithBotTop.lean

tactic: simp [← Ioi_inter_Iio]
state_before: α : Type u_1
inst✝ : Preorder α
a b : α
⊢ some ⁻¹' Ioo ↑a ↑b = Ioo a b
state_after: no goals