1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: IsPrimitiveRoot.prime_norm_toInteger_sub_one_of_prime_ne_two'
File: Mathlib/NumberTheory/Cyclotomic/Rat.lean

tactic: have : IsCyclotomicExtension {p ^ (0 + 1)} ℚ K := by simpa using hcycl
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p} ℚ K
hζ : IsPrimitiveRoot ζ ↑p
hodd : p ≠ 2
⊢ Prime ((Algebra.norm ℤ) (hζ.toInteger - 1))
state_after: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p} ℚ K
hζ : IsPrimitiveRoot ζ ↑p
hodd : p ≠ 2
this : IsCyclotomicExtension {p ^ (0 + 1)} ℚ K
⊢ Prime ((Algebra.norm ℤ) (hζ.toInteger - 1))

tactic: replace hζ : IsPrimitiveRoot ζ (p ^ (0 + 1)) := by simpa using hζ
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p} ℚ K
hζ : IsPrimitiveRoot ζ ↑p
hodd : p ≠ 2
this : IsCyclotomicExtension {p ^ (0 + 1)} ℚ K
⊢ Prime ((Algebra.norm ℤ) (hζ.toInteger - 1))
state_after: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p} ℚ K
hζ✝ : IsPrimitiveRoot ζ ↑p
hodd : p ≠ 2
this : IsCyclotomicExtension {p ^ (0 + 1)} ℚ K
hζ : IsPrimitiveRoot ζ (↑p ^ (0 + 1))
⊢ Prime ((Algebra.norm ℤ) (hζ✝.toInteger - 1))

tactic: exact hζ.prime_norm_toInteger_sub_one_of_prime_ne_two hodd
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p} ℚ K
hζ✝ : IsPrimitiveRoot ζ ↑p
hodd : p ≠ 2
this : IsCyclotomicExtension {p ^ (0 + 1)} ℚ K
hζ : IsPrimitiveRoot ζ (↑p ^ (0 + 1))
⊢ Prime ((Algebra.norm ℤ) (hζ✝.toInteger - 1))
state_after: no goals

tactic: simpa using hcycl
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p} ℚ K
hζ : IsPrimitiveRoot ζ ↑p
hodd : p ≠ 2
⊢ IsCyclotomicExtension {p ^ (0 + 1)} ℚ K
state_after: no goals

tactic: simpa using hζ
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p} ℚ K
hζ : IsPrimitiveRoot ζ ↑p
hodd : p ≠ 2
this : IsCyclotomicExtension {p ^ (0 + 1)} ℚ K
⊢ IsPrimitiveRoot ζ (↑p ^ (0 + 1))
state_after: no goals
Theorem: Finset.prod_subset
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: simpa
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 β
h : s₁ ⊆ s₂
hf : ∀ x ∈ s₂, x ∉ s₁ → f x = 1
this : DecidableEq α
⊢ ∀ x ∈ s₂ \ s₁, f x = 1
state_after: no goals
Theorem: Finset.biUnion_mono
File: Mathlib/Data/Finset/Union.lean

tactic: have : ∀ b a, a ∈ s → b ∈ t₁ a → ∃ a : α, a ∈ s ∧ b ∈ t₂ a := fun b a ha hb ↦
  ⟨a, ha, Finset.mem_of_subset (h a ha) hb⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s s₁ s₂ : Finset α
t t₁ t₂ : α → Finset β
inst✝ : DecidableEq β
h : ∀ a ∈ s, t₁ a ⊆ t₂ a
⊢ s.biUnion t₁ ⊆ s.biUnion t₂
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
s s₁ s₂ : Finset α
t t₁ t₂ : α → Finset β
inst✝ : DecidableEq β
h : ∀ a ∈ s, t₁ a ⊆ t₂ a
this : ∀ (b : β), ∀ a ∈ s, b ∈ t₁ a → ∃ a ∈ s, b ∈ t₂ a
⊢ s.biUnion t₁ ⊆ s.biUnion t₂

tactic: simpa only [subset_iff, mem_biUnion, exists_imp, and_imp, exists_prop]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s s₁ s₂ : Finset α
t t₁ t₂ : α → Finset β
inst✝ : DecidableEq β
h : ∀ a ∈ s, t₁ a ⊆ t₂ a
this : ∀ (b : β), ∀ a ∈ s, b ∈ t₁ a → ∃ a ∈ s, b ∈ t₂ a
⊢ s.biUnion t₁ ⊆ s.biUnion t₂
state_after: no goals
Theorem: Complex.tan_add_mul_I
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean

tactic: rw [tan_add h, tan_mul_I, mul_assoc]
state_before: x y : ℂ
h :
  ((∀ (k : ℤ), x ≠ (2 * ↑k + 1) * ↑π / 2) ∧ ∀ (l : ℤ), y * I ≠ (2 * ↑l + 1) * ↑π / 2) ∨
    (∃ k, x = (2 * ↑k + 1) * ↑π / 2) ∧ ∃ l, y * I = (2 * ↑l + 1) * ↑π / 2
⊢ tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I)
state_after: no goals
Theorem: UniformSpace.mem_nhds_iff
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: rw [nhds_eq_comap_uniformity, mem_comap]
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
x : α
s : Set α
⊢ s ∈ 𝓝 x ↔ ∃ V ∈ 𝓤 α, ball x V ⊆ s
state_after: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
x : α
s : Set α
⊢ (∃ t ∈ 𝓤 α, Prod.mk x ⁻¹' t ⊆ s) ↔ ∃ V ∈ 𝓤 α, ball x V ⊆ s

tactic: simp_rw [ball]
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
x : α
s : Set α
⊢ (∃ t ∈ 𝓤 α, Prod.mk x ⁻¹' t ⊆ s) ↔ ∃ V ∈ 𝓤 α, ball x V ⊆ s
state_after: no goals
Theorem: Monoid.Coprod.snd_toProd
File: Mathlib/GroupTheory/Coprod/Basic.lean

tactic: rw [← snd_comp_toProd]
state_before: M : Type u_1
N : Type u_2
inst✝¹ : Monoid M
inst✝ : Monoid N
x : M ∗ N
⊢ (toProd x).2 = snd x
state_after: M : Type u_1
N : Type u_2
inst✝¹ : Monoid M
inst✝ : Monoid N
x : M ∗ N
⊢ (toProd x).2 = ((MonoidHom.snd M N).comp toProd) x

tactic: rfl
state_before: M : Type u_1
N : Type u_2
inst✝¹ : Monoid M
inst✝ : Monoid N
x : M ∗ N
⊢ (toProd x).2 = ((MonoidHom.snd M N).comp toProd) x
state_after: no goals
Theorem: Cubic.map_toPoly
File: Mathlib/Algebra/CubicDiscriminant.lean

tactic: simp only [map, toPoly, map_C, map_X, Polynomial.map_add, Polynomial.map_mul, Polynomial.map_pow]
state_before: R : Type u_1
S : Type u_2
F : Type u_3
K : Type u_4
P Q : Cubic R
a b c d a' b' c' d' : R
inst✝¹ : Semiring R
inst✝ : Semiring S
φ : R →+* S
⊢ (map φ P).toPoly = Polynomial.map φ P.toPoly
state_after: no goals
Theorem: sInf_within_of_ordConnected
File: Mathlib/Order/CompleteLatticeIntervals.lean

tactic: obtain ⟨c, hct⟩ : ∃ c, c ∈ t := ht
state_before: ι : Sort u_1
α : Type u_2
s✝ : Set α
inst✝ : ConditionallyCompleteLinearOrder α
s : Set α
hs : s.OrdConnected
t : Set ↑s
ht : t.Nonempty
h_bdd : BddBelow t
⊢ sInf (Subtype.val '' t) ∈ s
state_after: case intro
ι : Sort u_1
α : Type u_2
s✝ : Set α
inst✝ : ConditionallyCompleteLinearOrder α
s : Set α
hs : s.OrdConnected
t : Set ↑s
h_bdd : BddBelow t
c : ↑s
hct : c ∈ t
⊢ sInf (Subtype.val '' t) ∈ s

tactic: obtain ⟨B, hB⟩ : ∃ B, B ∈ lowerBounds t := h_bdd
state_before: case intro
ι : Sort u_1
α : Type u_2
s✝ : Set α
inst✝ : ConditionallyCompleteLinearOrder α
s : Set α
hs : s.OrdConnected
t : Set ↑s
h_bdd : BddBelow t
c : ↑s
hct : c ∈ t
⊢ sInf (Subtype.val '' t) ∈ s
state_after: case intro.intro
ι : Sort u_1
α : Type u_2
s✝ : Set α
inst✝ : ConditionallyCompleteLinearOrder α
s : Set α
hs : s.OrdConnected
t : Set ↑s
c : ↑s
hct : c ∈ t
B : ↑s
hB : B ∈ lowerBounds t
⊢ sInf (Subtype.val '' t) ∈ s

tactic: refine hs.out B.2 c.2 ⟨?_, ?_⟩
state_before: case intro.intro
ι : Sort u_1
α : Type u_2
s✝ : Set α
inst✝ : ConditionallyCompleteLinearOrder α
s : Set α
hs : s.OrdConnected
t : Set ↑s
c : ↑s
hct : c ∈ t
B : ↑s
hB : B ∈ lowerBounds t
⊢ sInf (Subtype.val '' t) ∈ s
state_after: case intro.intro.refine_1
ι : Sort u_1
α : Type u_2
s✝ : Set α
inst✝ : ConditionallyCompleteLinearOrder α
s : Set α
hs : s.OrdConnected
t : Set ↑s
c : ↑s
hct : c ∈ t
B : ↑s
hB : B ∈ lowerBounds t
⊢ ↑B ≤ sInf (Subtype.val '' t)

case intro.intro.refine_2
ι : Sort u_1
α : Type u_2
s✝ : Set α
inst✝ : ConditionallyCompleteLinearOrder α
s : Set α
hs : s.OrdConnected
t : Set ↑s
c : ↑s
hct : c ∈ t
B : ↑s
hB : B ∈ lowerBounds t
⊢ sInf (Subtype.val '' t) ≤ ↑c

tactic: exact (Subtype.mono_coe s).le_csInf_image ⟨c, hct⟩ hB
state_before: case intro.intro.refine_1
ι : Sort u_1
α : Type u_2
s✝ : Set α
inst✝ : ConditionallyCompleteLinearOrder α
s : Set α
hs : s.OrdConnected
t : Set ↑s
c : ↑s
hct : c ∈ t
B : ↑s
hB : B ∈ lowerBounds t
⊢ ↑B ≤ sInf (Subtype.val '' t)
state_after: no goals

tactic: exact (Subtype.mono_coe s).csInf_image_le hct ⟨B, hB⟩
state_before: case intro.intro.refine_2
ι : Sort u_1
α : Type u_2
s✝ : Set α
inst✝ : ConditionallyCompleteLinearOrder α
s : Set α
hs : s.OrdConnected
t : Set ↑s
c : ↑s
hct : c ∈ t
B : ↑s
hB : B ∈ lowerBounds t
⊢ sInf (Subtype.val '' t) ≤ ↑c
state_after: no goals
Theorem: NonUnitalSubalgebra.toSubmodule_injective
File: Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean

tactic: rw [← mem_toSubmodule, ← mem_toSubmodule, h]
state_before: F : Type v'
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : NonUnitalNonAssocSemiring A
inst✝⁴ : NonUnitalNonAssocSemiring B
inst✝³ : NonUnitalNonAssocSemiring C
inst✝² : Module R A
inst✝¹ : Module R B
inst✝ : Module R C
S T : NonUnitalSubalgebra R A
h : S.toSubmodule = T.toSubmodule
x : A
⊢ x ∈ S ↔ x ∈ T
state_after: no goals
Theorem: PowerSeries.natDegree_trunc_lt
File: Mathlib/RingTheory/PowerSeries/Trunc.lean

tactic: rw [Nat.lt_succ_iff, natDegree_le_iff_coeff_eq_zero]
state_before: R : Type u_1
inst✝ : Semiring R
f : R⟦X⟧
n : ℕ
⊢ (trunc (n + 1) f).natDegree < n + 1
state_after: R : Type u_1
inst✝ : Semiring R
f : R⟦X⟧
n : ℕ
⊢ ∀ (N : ℕ), n < N → (trunc (n + 1) f).coeff N = 0

tactic: intros
state_before: R : Type u_1
inst✝ : Semiring R
f : R⟦X⟧
n : ℕ
⊢ ∀ (N : ℕ), n < N → (trunc (n + 1) f).coeff N = 0
state_after: R : Type u_1
inst✝ : Semiring R
f : R⟦X⟧
n N✝ : ℕ
a✝ : n < N✝
⊢ (trunc (n + 1) f).coeff N✝ = 0

tactic: rw [coeff_trunc]
state_before: R : Type u_1
inst✝ : Semiring R
f : R⟦X⟧
n N✝ : ℕ
a✝ : n < N✝
⊢ (trunc (n + 1) f).coeff N✝ = 0
state_after: R : Type u_1
inst✝ : Semiring R
f : R⟦X⟧
n N✝ : ℕ
a✝ : n < N✝
⊢ (if N✝ < n + 1 then (coeff R N✝) f else 0) = 0

tactic: split_ifs with h
state_before: R : Type u_1
inst✝ : Semiring R
f : R⟦X⟧
n N✝ : ℕ
a✝ : n < N✝
⊢ (if N✝ < n + 1 then (coeff R N✝) f else 0) = 0
state_after: case pos
R : Type u_1
inst✝ : Semiring R
f : R⟦X⟧
n N✝ : ℕ
a✝ : n < N✝
h : N✝ < n + 1
⊢ (coeff R N✝) f = 0

case neg
R : Type u_1
inst✝ : Semiring R
f : R⟦X⟧
n N✝ : ℕ
a✝ : n < N✝
h : ¬N✝ < n + 1
⊢ 0 = 0

tactic: rw [lt_succ, ← not_lt] at h
state_before: case pos
R : Type u_1
inst✝ : Semiring R
f : R⟦X⟧
n N✝ : ℕ
a✝ : n < N✝
h : N✝ < n + 1
⊢ (coeff R N✝) f = 0
state_after: case pos
R : Type u_1
inst✝ : Semiring R
f : R⟦X⟧
n N✝ : ℕ
a✝ : n < N✝
h : ¬n < N✝
⊢ (coeff R N✝) f = 0

tactic: contradiction
state_before: case pos
R : Type u_1
inst✝ : Semiring R
f : R⟦X⟧
n N✝ : ℕ
a✝ : n < N✝
h : ¬n < N✝
⊢ (coeff R N✝) f = 0
state_after: no goals

tactic: rfl
state_before: case neg
R : Type u_1
inst✝ : Semiring R
f : R⟦X⟧
n N✝ : ℕ
a✝ : n < N✝
h : ¬N✝ < n + 1
⊢ 0 = 0
state_after: no goals
Theorem: leOnePart_eq_inv
File: Mathlib/Algebra/Order/Group/PosPart.lean

tactic: simp [leOnePart]
state_before: α : Type u_1
β : Type u_2
inst✝³ : Lattice α
inst✝² : Group α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a : α
⊢ a⁻ᵐ = a⁻¹ ↔ a ≤ 1
state_after: no goals
Theorem: CategoryTheory.epi_of_epi_fac
File: Mathlib/CategoryTheory/Category/Basic.lean

tactic: subst h
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝ X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
h : X ⟶ Z
inst✝ : Epi h
w : f ≫ g = h
⊢ Epi g
state_after: C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝ X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝ : Epi (f ≫ g)
⊢ Epi g

tactic: exact epi_of_epi f g
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z✝ X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝ : Epi (f ≫ g)
⊢ Epi g
state_after: no goals
Theorem: Normal.tower_top_of_normal
File: Mathlib/FieldTheory/Normal.lean

tactic: cases' h.out x with hx hhx
state_before: F : Type u_1
K : Type u_2
inst✝⁶ : Field F
inst✝⁵ : Field K
inst✝⁴ : Algebra F K
E : Type u_3
inst✝³ : Field E
inst✝² : Algebra F E
inst✝¹ : Algebra K E
inst✝ : IsScalarTower F K E
h : Normal F E
x : E
⊢ IsIntegral K x ∧ Splits (algebraMap K E) (minpoly K x)
state_after: case intro
F : Type u_1
K : Type u_2
inst✝⁶ : Field F
inst✝⁵ : Field K
inst✝⁴ : Algebra F K
E : Type u_3
inst✝³ : Field E
inst✝² : Algebra F E
inst✝¹ : Algebra K E
inst✝ : IsScalarTower F K E
h : Normal F E
x : E
hx : IsIntegral F x
hhx : Splits (algebraMap F E) (minpoly F x)
⊢ IsIntegral K x ∧ Splits (algebraMap K E) (minpoly K x)

tactic: rw [algebraMap_eq F K E] at hhx
state_before: case intro
F : Type u_1
K : Type u_2
inst✝⁶ : Field F
inst✝⁵ : Field K
inst✝⁴ : Algebra F K
E : Type u_3
inst✝³ : Field E
inst✝² : Algebra F E
inst✝¹ : Algebra K E
inst✝ : IsScalarTower F K E
h : Normal F E
x : E
hx : IsIntegral F x
hhx : Splits (algebraMap F E) (minpoly F x)
⊢ IsIntegral K x ∧ Splits (algebraMap K E) (minpoly K x)
state_after: case intro
F : Type u_1
K : Type u_2
inst✝⁶ : Field F
inst✝⁵ : Field K
inst✝⁴ : Algebra F K
E : Type u_3
inst✝³ : Field E
inst✝² : Algebra F E
inst✝¹ : Algebra K E
inst✝ : IsScalarTower F K E
h : Normal F E
x : E
hx : IsIntegral F x
hhx : Splits ((algebraMap K E).comp (algebraMap F K)) (minpoly F x)
⊢ IsIntegral K x ∧ Splits (algebraMap K E) (minpoly K x)

tactic: exact
  ⟨hx.tower_top,
    Polynomial.splits_of_splits_of_dvd (algebraMap K E)
      (Polynomial.map_ne_zero (minpoly.ne_zero hx))
      ((Polynomial.splits_map_iff (algebraMap F K) (algebraMap K E)).mpr hhx)
      (minpoly.dvd_map_of_isScalarTower F K x)⟩
state_before: case intro
F : Type u_1
K : Type u_2
inst✝⁶ : Field F
inst✝⁵ : Field K
inst✝⁴ : Algebra F K
E : Type u_3
inst✝³ : Field E
inst✝² : Algebra F E
inst✝¹ : Algebra K E
inst✝ : IsScalarTower F K E
h : Normal F E
x : E
hx : IsIntegral F x
hhx : Splits ((algebraMap K E).comp (algebraMap F K)) (minpoly F x)
⊢ IsIntegral K x ∧ Splits (algebraMap K E) (minpoly K x)
state_after: no goals
Theorem: Irreducible.coprime_iff_not_dvd
File: Mathlib/RingTheory/PrincipalIdealDomain.lean

tactic: rw [← isRelPrime_iff_isCoprime, hp.isRelPrime_iff_not_dvd]
state_before: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : IsBezout R
p n : R
hp : Irreducible p
⊢ IsCoprime p n ↔ ¬p ∣ n
state_after: no goals
Theorem: PiNat.mem_cylinder_iff_dist_le
File: Mathlib/Topology/MetricSpace/PiNat.lean

tactic: rcases eq_or_ne y x with (rfl | hne)
state_before: E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
⊢ y ∈ cylinder x n ↔ dist y x ≤ (1 / 2) ^ n
state_after: case inl
E : ℕ → Type u_1
y : (n : ℕ) → E n
n : ℕ
⊢ y ∈ cylinder y n ↔ dist y y ≤ (1 / 2) ^ n

case inr
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
hne : y ≠ x
⊢ y ∈ cylinder x n ↔ dist y x ≤ (1 / 2) ^ n

tactic: suffices (∀ i : ℕ, i < n → y i = x i) ↔ n ≤ firstDiff y x by simpa [dist_eq_of_ne hne]
state_before: case inr
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
hne : y ≠ x
⊢ y ∈ cylinder x n ↔ dist y x ≤ (1 / 2) ^ n
state_after: case inr
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
hne : y ≠ x
⊢ (∀ i < n, y i = x i) ↔ n ≤ firstDiff y x

tactic: constructor
state_before: case inr
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
hne : y ≠ x
⊢ (∀ i < n, y i = x i) ↔ n ≤ firstDiff y x
state_after: case inr.mp
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
hne : y ≠ x
⊢ (∀ i < n, y i = x i) → n ≤ firstDiff y x

case inr.mpr
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
hne : y ≠ x
⊢ n ≤ firstDiff y x → ∀ i < n, y i = x i

tactic: simp [PiNat.dist_self]
state_before: case inl
E : ℕ → Type u_1
y : (n : ℕ) → E n
n : ℕ
⊢ y ∈ cylinder y n ↔ dist y y ≤ (1 / 2) ^ n
state_after: no goals

tactic: simpa [dist_eq_of_ne hne]
state_before: E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
hne : y ≠ x
this : (∀ i < n, y i = x i) ↔ n ≤ firstDiff y x
⊢ y ∈ cylinder x n ↔ dist y x ≤ (1 / 2) ^ n
state_after: no goals

tactic: intro hy
state_before: case inr.mp
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
hne : y ≠ x
⊢ (∀ i < n, y i = x i) → n ≤ firstDiff y x
state_after: case inr.mp
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
hne : y ≠ x
hy : ∀ i < n, y i = x i
⊢ n ≤ firstDiff y x

tactic: by_contra! H
state_before: case inr.mp
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
hne : y ≠ x
hy : ∀ i < n, y i = x i
⊢ n ≤ firstDiff y x
state_after: case inr.mp
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
hne : y ≠ x
hy : ∀ i < n, y i = x i
H : firstDiff y x < n
⊢ False

tactic: exact apply_firstDiff_ne hne (hy _ H)
state_before: case inr.mp
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
hne : y ≠ x
hy : ∀ i < n, y i = x i
H : firstDiff y x < n
⊢ False
state_after: no goals

tactic: intro h i hi
state_before: case inr.mpr
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
hne : y ≠ x
⊢ n ≤ firstDiff y x → ∀ i < n, y i = x i
state_after: case inr.mpr
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
hne : y ≠ x
h : n ≤ firstDiff y x
i : ℕ
hi : i < n
⊢ y i = x i

tactic: exact apply_eq_of_lt_firstDiff (hi.trans_le h)
state_before: case inr.mpr
E : ℕ → Type u_1
x y : (n : ℕ) → E n
n : ℕ
hne : y ≠ x
h : n ≤ firstDiff y x
i : ℕ
hi : i < n
⊢ y i = x i
state_after: no goals
Theorem: uniformContinuous_of_const
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: simp [comap_principal, this, univ_mem]
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝¹ : UniformSpace α
inst✝ : UniformSpace β
c : α → β
h : ∀ (a b : α), c a = c b
this : (fun x => (c x.1, c x.2)) ⁻¹' idRel = univ
⊢ 𝓤 α ≤ comap (fun x => (c x.1, c x.2)) (𝓟 idRel)
state_after: no goals
Theorem: DualNumber.lift_op_smul
File: Mathlib/Algebra/DualNumber.lean

tactic: rw [← mul_inl_eq_op_smul, map_mul, lift_apply_inl]
state_before: R : Type u_1
A✝ : Type u_2
B : Type u_3
A : Type u_4
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
fe : { fe // fe.2 * fe.2 = 0 ∧ ∀ (a : A), Commute fe.2 (fe.1 a) }
a : A
ad : A[ε]
⊢ (lift fe) (MulOpposite.op a • ad) = (lift fe) ad * (↑fe).1 a
state_after: no goals
Theorem: List.count_replicate
File: .lake/packages/batteries/Batteries/Data/List/Count.lean

tactic: split
state_before: α : Type u_1
inst✝ : DecidableEq α
a b : α
n : Nat
⊢ count a (replicate n b) = if a = b then n else 0
state_after: case isTrue
α : Type u_1
inst✝ : DecidableEq α
a b : α
n : Nat
h✝ : a = b
⊢ count a (replicate n b) = n

case isFalse
α : Type u_1
inst✝ : DecidableEq α
a b : α
n : Nat
h✝ : ¬a = b
⊢ count a (replicate n b) = 0

tactic: exacts [‹a = b› ▸ count_replicate_self .., count_eq_zero.2 <| mt eq_of_mem_replicate ‹a ≠ b›]
state_before: case isTrue
α : Type u_1
inst✝ : DecidableEq α
a b : α
n : Nat
h✝ : a = b
⊢ count a (replicate n b) = n

case isFalse
α : Type u_1
inst✝ : DecidableEq α
a b : α
n : Nat
h✝ : ¬a = b
⊢ count a (replicate n b) = 0
state_after: no goals
Theorem: Polynomial.toFinsupp_algebraMap
File: Mathlib/Algebra/Polynomial/AlgebraMap.lean

tactic: rw [toFinsupp_C]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
A' : Type u_1
B : Type u_2
a b : R
n : ℕ
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
p q r✝ : R[X]
r : R
⊢ (C ((algebraMap R A) r)).toFinsupp = (algebraMap R (AddMonoidAlgebra A ℕ)) r
state_after: R : Type u
S : Type v
T : Type w
A : Type z
A' : Type u_1
B : Type u_2
a b : R
n : ℕ
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
p q r✝ : R[X]
r : R
⊢ AddMonoidAlgebra.single 0 ((algebraMap R A) r) = (algebraMap R (AddMonoidAlgebra A ℕ)) r

tactic: rfl
state_before: R : Type u
S : Type v
T : Type w
A : Type z
A' : Type u_1
B : Type u_2
a b : R
n : ℕ
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
p q r✝ : R[X]
r : R
⊢ AddMonoidAlgebra.single 0 ((algebraMap R A) r) = (algebraMap R (AddMonoidAlgebra A ℕ)) r
state_after: no goals
Theorem: ZMod.gauss_lemma_aux
File: Mathlib/NumberTheory/LegendreSymbol/GaussEisensteinLemmas.lean

tactic: rw [Ne, CharP.cast_eq_zero_iff (ZMod p) p, hp.1.dvd_factorial, not_le]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
a : ℤ
hap : ↑a ≠ 0
⊢ ↑(p / 2)! ≠ 0
state_after: p : ℕ
hp : Fact (Nat.Prime p)
a : ℤ
hap : ↑a ≠ 0
⊢ p / 2 < p

tactic: exact Nat.div_lt_self hp.1.pos (by decide)
state_before: p : ℕ
hp : Fact (Nat.Prime p)
a : ℤ
hap : ↑a ≠ 0
⊢ p / 2 < p
state_after: no goals

tactic: decide
state_before: p : ℕ
hp : Fact (Nat.Prime p)
a : ℤ
hap : ↑a ≠ 0
⊢ 1 < 2
state_after: no goals

tactic: simpa using gauss_lemma_aux₁ p hap
state_before: p : ℕ
hp : Fact (Nat.Prime p)
a : ℤ
hap : ↑a ≠ 0
⊢ ↑a ^ (p / 2) * ↑(p / 2)! = ↑((-1) ^ (filter (fun x => p / 2 < (↑a * ↑x).val) (Ico 1 (p / 2).succ)).card) * ↑(p / 2)!
state_after: no goals
Theorem: ProbabilityTheory.isRatStieltjesPoint_unit_prod_iff
File: Mathlib/Probability/Kernel/Disintegration/MeasurableStieltjes.lean

tactic: constructor <;>
  exact fun h ↦ ⟨h.mono, h.tendsto_atTop_one, h.tendsto_atBot_zero, h.iInf_rat_gt_eq⟩
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f✝ f : α → ℚ → ℝ
a : α
⊢ IsRatStieltjesPoint (fun p => f p.2) ((), a) ↔ IsRatStieltjesPoint f a
state_after: no goals
Theorem: Finset.le_card_infs_mul_card_sups
File: Mathlib/Combinatorics/SetFamily/FourFunctions.lean

tactic: simpa using four_functions_theorem (1 : α → ℕ) 1 1 1 zero_le_one zero_le_one zero_le_one
  zero_le_one (fun _ _ ↦ le_rfl) s t
state_before: α : Type u_1
β : Type u_2
inst✝³ : DistribLattice α
inst✝² : LinearOrderedCommSemiring β
inst✝¹ : ExistsAddOfLE β
f f₁ f₂ f₃ f₄ g μ : α → β
inst✝ : DecidableEq α
s t : Finset α
⊢ s.card * t.card ≤ (s ⊼ t).card * (s ⊻ t).card
state_after: no goals
Theorem: Real.list_prod_map_rpow
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: lift l to List ℝ≥0 using hl
state_before: w x y z : ℝ
l : List ℝ
hl : ∀ x ∈ l, 0 ≤ x
r : ℝ
⊢ (List.map (fun x => x ^ r) l).prod = l.prod ^ r
state_after: case intro
w x y z r : ℝ
l : List ℝ≥0
⊢ (List.map (fun x => x ^ r) (List.map toReal l)).prod = (List.map toReal l).prod ^ r

tactic: have := congr_arg ((↑) : ℝ≥0 → ℝ) (NNReal.list_prod_map_rpow l r)
state_before: case intro
w x y z r : ℝ
l : List ℝ≥0
⊢ (List.map (fun x => x ^ r) (List.map toReal l)).prod = (List.map toReal l).prod ^ r
state_after: case intro
w x y z r : ℝ
l : List ℝ≥0
this : ↑(List.map (fun x => x ^ r) l).prod = ↑(l.prod ^ r)
⊢ (List.map (fun x => x ^ r) (List.map toReal l)).prod = (List.map toReal l).prod ^ r

tactic: push_cast at this
state_before: case intro
w x y z r : ℝ
l : List ℝ≥0
this : ↑(List.map (fun x => x ^ r) l).prod = ↑(l.prod ^ r)
⊢ (List.map (fun x => x ^ r) (List.map toReal l)).prod = (List.map toReal l).prod ^ r
state_after: case intro
w x y z r : ℝ
l : List ℝ≥0
this : (List.map toReal (List.map (fun x => x ^ r) l)).prod = (List.map toReal l).prod ^ r
⊢ (List.map (fun x => x ^ r) (List.map toReal l)).prod = (List.map toReal l).prod ^ r

tactic: rw [List.map_map] at this ⊢
state_before: case intro
w x y z r : ℝ
l : List ℝ≥0
this : (List.map toReal (List.map (fun x => x ^ r) l)).prod = (List.map toReal l).prod ^ r
⊢ (List.map (fun x => x ^ r) (List.map toReal l)).prod = (List.map toReal l).prod ^ r
state_after: case intro
w x y z r : ℝ
l : List ℝ≥0
this : (List.map (toReal ∘ fun x => x ^ r) l).prod = (List.map toReal l).prod ^ r
⊢ (List.map ((fun x => x ^ r) ∘ toReal) l).prod = (List.map toReal l).prod ^ r

tactic: exact mod_cast this
state_before: case intro
w x y z r : ℝ
l : List ℝ≥0
this : (List.map (toReal ∘ fun x => x ^ r) l).prod = (List.map toReal l).prod ^ r
⊢ (List.map ((fun x => x ^ r) ∘ toReal) l).prod = (List.map toReal l).prod ^ r
state_after: no goals
Theorem: EMetric.diam_closure
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: refine le_antisymm (diam_le fun x hx y hy => ?_) (diam_mono subset_closure)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
s : Set α
⊢ diam (closure s) = diam s
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
s : Set α
x : α
hx : x ∈ closure s
y : α
hy : y ∈ closure s
⊢ edist x y ≤ diam s

tactic: have : edist x y ∈ closure (Iic (diam s)) :=
  map_mem_closure₂ continuous_edist hx hy fun x hx y hy => edist_le_diam_of_mem hx hy
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
s : Set α
x : α
hx : x ∈ closure s
y : α
hy : y ∈ closure s
⊢ edist x y ≤ diam s
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
s : Set α
x : α
hx : x ∈ closure s
y : α
hy : y ∈ closure s
this : edist x y ∈ closure (Iic (diam s))
⊢ edist x y ≤ diam s

tactic: rwa [closure_Iic] at this
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
s : Set α
x : α
hx : x ∈ closure s
y : α
hy : y ∈ closure s
this : edist x y ∈ closure (Iic (diam s))
⊢ edist x y ≤ diam s
state_after: no goals