tasksource/leandojo huggingface dataset:
Theorem: List.zipWith_distrib_take
File: Mathlib/Data/List/Zip.lean

tactic: induction' l with hd tl hl generalizing l' n
state_before: α : Type u
β : Type u_2
γ : Type u_1
δ : Type ?u.191507
ε : Type ?u.191510
f : α → β → γ
l : List α
l' : List β
n : ℕ
⊢ take n (zipWith f l l') = zipWith f (take n l) (take n l')

tactic: simp
state_before: case nil
α : Type u
β : Type u_2
γ : Type u_1
δ : Type ?u.191507
ε : Type ?u.191510
f : α → β → γ
l : List α
l'✝ : List β
n✝ : ℕ
l' : List β
n : ℕ
⊢ take n (zipWith f [] l') = zipWith f (take n []) (take n l')

tactic: cases l'
state_before: case cons
α : Type u
β : Type u_2
γ : Type u_1
δ : Type ?u.191507
ε : Type ?u.191510
f : α → β → γ
l : List α
l'✝ : List β
n✝ : ℕ
hd : α
tl : List α
hl : ∀ (l' : List β) (n : ℕ), take n (zipWith f tl l') = zipWith f (take n tl) (take n l')
l' : List β
n : ℕ
⊢ take n (zipWith f (hd :: tl) l') = zipWith f (take n (hd :: tl)) (take n l')

tactic: simp
state_before: case cons.nil
α : Type u
β : Type u_2
γ : Type u_1
δ : Type ?u.191507
ε : Type ?u.191510
f : α → β → γ
l : List α
l' : List β
n✝ : ℕ
hd : α
tl : List α
hl : ∀ (l' : List β) (n : ℕ), take n (zipWith f tl l') = zipWith f (take n tl) (take n l')
n : ℕ
⊢ take n (zipWith f (hd :: tl) []) = zipWith f (take n (hd :: tl)) (take n [])

tactic: cases n
state_before: case cons.cons
α : Type u
β : Type u_2
γ : Type u_1
δ : Type ?u.191507
ε : Type ?u.191510
f : α → β → γ
l : List α
l' : List β
n✝ : ℕ
hd : α
tl : List α
hl : ∀ (l' : List β) (n : ℕ), take n (zipWith f tl l') = zipWith f (take n tl) (take n l')
n : ℕ
head✝ : β
tail✝ : List β
⊢ take n (zipWith f (hd :: tl) (head✝ :: tail✝)) = zipWith f (take n (hd :: tl)) (take n (head✝ :: tail✝))

tactic: simp
state_before: case cons.cons.zero
α : Type u
β : Type u_2
γ : Type u_1
δ : Type ?u.191507
ε : Type ?u.191510
f : α → β → γ
l : List α
l' : List β
n : ℕ
hd : α
tl : List α
hl : ∀ (l' : List β) (n : ℕ), take n (zipWith f tl l') = zipWith f (take n tl) (take n l')
head✝ : β
tail✝ : List β
⊢ take zero (zipWith f (hd :: tl) (head✝ :: tail✝)) = zipWith f (take zero (hd :: tl)) (take zero (head✝ :: tail✝))

tactic: simp [hl]
state_before: case cons.cons.succ
α : Type u
β : Type u_2
γ : Type u_1
δ : Type ?u.191507
ε : Type ?u.191510
f : α → β → γ
l : List α
l' : List β
n : ℕ
hd : α
tl : List α
hl : ∀ (l' : List β) (n : ℕ), take n (zipWith f tl l') = zipWith f (take n tl) (take n l')
head✝ : β
tail✝ : List β
n✝ : ℕ
⊢ take (succ n✝) (zipWith f (hd :: tl) (head✝ :: tail✝)) =
    zipWith f (take (succ n✝) (hd :: tl)) (take (succ n✝) (head✝ :: tail✝))
Theorem: List.find?_cons_of_neg
File: Std/Data/List/Lemmas.lean

tactic: simp [find?, h]
state_before: α✝ : Type u_1
p : α✝ → Bool
a : α✝
l : List α✝
h : ¬p a = true
⊢ find? p (a :: l) = find? p l
Theorem: AdjoinRoot.minpoly_powerBasis_gen_of_monic
File: Mathlib/RingTheory/AdjoinRoot.lean

tactic: rw [minpoly_powerBasis_gen hf', hf.leadingCoeff, inv_one, C.map_one, mul_one]
state_before: R : Type u
S : Type v
K : Type w
inst✝¹ : CommRing R
g : R[X]
inst✝ : Field K
f : K[X]
hf : Monic f
hf' : optParam (f ≠ 0) (_ : f ≠ 0)
⊢ minpoly K (powerBasis hf').gen = f
Theorem: IsOfFinOrder.inv
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: rcases(isOfFinOrder_iff_pow_eq_one x).mp hx with ⟨n, npos, hn⟩
state_before: G : Type u
A : Type v
x✝ y : G
a b : A
n m : ℕ
inst✝¹ : Group G
inst✝ : AddGroup A
i : ℤ
x : G
hx : IsOfFinOrder x
⊢ ∃ n, 0 < n ∧ x⁻¹ ^ n = 1

tactic: refine' ⟨n, npos, by simp_rw [inv_pow, hn, inv_one]⟩
state_before: case intro.intro
G : Type u
A : Type v
x✝ y : G
a b : A
n✝ m : ℕ
inst✝¹ : Group G
inst✝ : AddGroup A
i : ℤ
x : G
hx : IsOfFinOrder x
n : ℕ
npos : 0 < n
hn : x ^ n = 1
⊢ ∃ n, 0 < n ∧ x⁻¹ ^ n = 1

tactic: simp_rw [inv_pow, hn, inv_one]
state_before: G : Type u
A : Type v
x✝ y : G
a b : A
n✝ m : ℕ
inst✝¹ : Group G
inst✝ : AddGroup A
i : ℤ
x : G
hx : IsOfFinOrder x
n : ℕ
npos : 0 < n
hn : x ^ n = 1
⊢ x⁻¹ ^ n = 1
Theorem: SimpleGraph.isEmpty_of_chromaticNumber_eq_zero
File: Mathlib/Combinatorics/SimpleGraph/Coloring.lean

tactic: have h' := G.colorable_chromaticNumber_of_fintype
state_before: V : Type u
G✝ : SimpleGraph V
α : Type v
C : Coloring G✝ α
G : SimpleGraph V
inst✝ : Finite V
h : chromaticNumber G = 0
⊢ IsEmpty V

tactic: rw [h] at h'
state_before: V : Type u
G✝ : SimpleGraph V
α : Type v
C : Coloring G✝ α
G : SimpleGraph V
inst✝ : Finite V
h : chromaticNumber G = 0
h' : Colorable G (chromaticNumber G)
⊢ IsEmpty V

tactic: exact G.isEmpty_of_colorable_zero h'
state_before: V : Type u
G✝ : SimpleGraph V
α : Type v
C : Coloring G✝ α
G : SimpleGraph V
inst✝ : Finite V
h : chromaticNumber G = 0
h' : Colorable G 0
⊢ IsEmpty V
Theorem: exists_integral_multiple
File: Mathlib/RingTheory/Algebraic.lean

tactic: rcases hz with ⟨p, p_ne_zero, px⟩
state_before: R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : CommRing S
inst✝ : Algebra R S
z : S
hz : IsAlgebraic R z
inj : ∀ (x : R), ↑(algebraMap R S) x = 0 → x = 0
⊢ ∃ x y x_1, z * ↑(algebraMap R S) y = ↑x

tactic: set a := p.leadingCoeff
state_before: case intro.intro
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : CommRing S
inst✝ : Algebra R S
z : S
inj : ∀ (x : R), ↑(algebraMap R S) x = 0 → x = 0
p : R[X]
p_ne_zero : p ≠ 0
px : ↑(aeval z) p = 0
⊢ ∃ x y x_1, z * ↑(algebraMap R S) y = ↑x

tactic: have a_ne_zero : a ≠ 0 := mt Polynomial.leadingCoeff_eq_zero.mp p_ne_zero
state_before: case intro.intro
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : CommRing S
inst✝ : Algebra R S
z : S
inj : ∀ (x : R), ↑(algebraMap R S) x = 0 → x = 0
p : R[X]
p_ne_zero : p ≠ 0
px : ↑(aeval z) p = 0
a : R := leadingCoeff p
⊢ ∃ x y x_1, z * ↑(algebraMap R S) y = ↑x

tactic: have x_integral : IsIntegral R (z * algebraMap R S a) :=
  ⟨p.integralNormalization, monic_integralNormalization p_ne_zero,
    integralNormalization_aeval_eq_zero px inj⟩
state_before: case intro.intro
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : CommRing S
inst✝ : Algebra R S
z : S
inj : ∀ (x : R), ↑(algebraMap R S) x = 0 → x = 0
p : R[X]
p_ne_zero : p ≠ 0
px : ↑(aeval z) p = 0
a : R := leadingCoeff p
a_ne_zero : a ≠ 0
⊢ ∃ x y x_1, z * ↑(algebraMap R S) y = ↑x

tactic: exact ⟨⟨_, x_integral⟩, a, a_ne_zero, rfl⟩
state_before: case intro.intro
R : Type u_1
S : Type u_2
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : CommRing S
inst✝ : Algebra R S
z : S
inj : ∀ (x : R), ↑(algebraMap R S) x = 0 → x = 0
p : R[X]
p_ne_zero : p ≠ 0
px : ↑(aeval z) p = 0
a : R := leadingCoeff p
a_ne_zero : a ≠ 0
x_integral : IsIntegral R (z * ↑(algebraMap R S) a)
⊢ ∃ x y x_1, z * ↑(algebraMap R S) y = ↑x
Theorem: Polynomial.derivative_X_add_C_pow
File: Mathlib/Data/Polynomial/Derivative.lean

tactic: rw [derivative_pow, derivative_X_add_C, mul_one]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : CommSemiring R
c : R
m : ℕ
⊢ ↑derivative ((X + ↑C c) ^ m) = ↑C ↑m * (X + ↑C c) ^ (m - 1)
Theorem: Real.Angle.two_zsmul_toReal_eq_two_mul
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: rw [two_zsmul, ← two_nsmul, two_nsmul_toReal_eq_two_mul]
state_before: θ : Angle
⊢ toReal (2 • θ) = 2 * toReal θ ↔ toReal θ ∈ Set.Ioc (-π / 2) (π / 2)
Theorem: Substring.ValidFor.nextn_stop
File: Std/Data/String/Lemmas.lean

tactic: simp [Substring.nextn, h.next_stop, h.nextn_stop n]
state_before: l m r : List Char
x✝ : Substring
h : ValidFor l m r x✝
n : Nat
⊢ nextn x✝ (n + 1) { byteIdx := utf8Len m } = { byteIdx := utf8Len m }
Theorem: Doset.bot_rel_eq_leftRel
File: Mathlib/GroupTheory/DoubleCoset.lean

tactic: ext (a b)
state_before: G : Type u_1
inst✝¹ : Group G
α : Type ?u.15522
inst✝ : Mul α
J : Subgroup G
g : G
H : Subgroup G
⊢ Setoid.Rel (setoid ↑⊥ ↑H) = Setoid.Rel (QuotientGroup.leftRel H)

tactic: rw [rel_iff, Setoid.Rel, QuotientGroup.leftRel_apply]
state_before: case h.h.a
G : Type u_1
inst✝¹ : Group G
α : Type ?u.15522
inst✝ : Mul α
J : Subgroup G
g : G
H : Subgroup G
a b : G
⊢ Setoid.Rel (setoid ↑⊥ ↑H) a b ↔ Setoid.Rel (QuotientGroup.leftRel H) a b

tactic: constructor
state_before: case h.h.a
G : Type u_1
inst✝¹ : Group G
α : Type ?u.15522
inst✝ : Mul α
J : Subgroup G
g : G
H : Subgroup G
a b : G
⊢ (∃ a_1, a_1 ∈ ⊥ ∧ ∃ b_1, b_1 ∈ H ∧ b = a_1 * a * b_1) ↔ a⁻¹ * b ∈ H

tactic: rintro ⟨a, rfl : a = 1, b, hb, rfl⟩
state_before: case h.h.a.mp
G : Type u_1
inst✝¹ : Group G
α : Type ?u.15522
inst✝ : Mul α
J : Subgroup G
g : G
H : Subgroup G
a b : G
⊢ (∃ a_1, a_1 ∈ ⊥ ∧ ∃ b_1, b_1 ∈ H ∧ b = a_1 * a * b_1) → a⁻¹ * b ∈ H

tactic: change a⁻¹ * (1 * a * b) ∈ H
state_before: case h.h.a.mp.intro.intro.intro.intro
G : Type u_1
inst✝¹ : Group G
α : Type ?u.15522
inst✝ : Mul α
J : Subgroup G
g : G
H : Subgroup G
a b : G
hb : b ∈ H
⊢ a⁻¹ * (1 * a * b) ∈ H

tactic: rwa [one_mul, inv_mul_cancel_left]
state_before: case h.h.a.mp.intro.intro.intro.intro
G : Type u_1
inst✝¹ : Group G
α : Type ?u.15522
inst✝ : Mul α
J : Subgroup G
g : G
H : Subgroup G
a b : G
hb : b ∈ H
⊢ a⁻¹ * (1 * a * b) ∈ H

tactic: rintro (h : a⁻¹ * b ∈ H)
state_before: case h.h.a.mpr
G : Type u_1
inst✝¹ : Group G
α : Type ?u.15522
inst✝ : Mul α
J : Subgroup G
g : G
H : Subgroup G
a b : G
⊢ a⁻¹ * b ∈ H → ∃ a_2, a_2 ∈ ⊥ ∧ ∃ b_1, b_1 ∈ H ∧ b = a_2 * a * b_1

tactic: exact ⟨1, rfl, a⁻¹ * b, h, by rw [one_mul, mul_inv_cancel_left]⟩
state_before: case h.h.a.mpr
G : Type u_1
inst✝¹ : Group G
α : Type ?u.15522
inst✝ : Mul α
J : Subgroup G
g : G
H : Subgroup G
a b : G
h : a⁻¹ * b ∈ H
⊢ ∃ a_1, a_1 ∈ ⊥ ∧ ∃ b_1, b_1 ∈ H ∧ b = a_1 * a * b_1

tactic: rw [one_mul, mul_inv_cancel_left]
state_before: G : Type u_1
inst✝¹ : Group G
α : Type ?u.15522
inst✝ : Mul α
J : Subgroup G
g : G
H : Subgroup G
a b : G
h : a⁻¹ * b ∈ H
⊢ b = 1 * a * (a⁻¹ * b)
Theorem: Finset.multiplicativeEnergy_univ_right
File: Mathlib/Combinatorics/Additive/Energy.lean

tactic: rw [multiplicativeEnergy_comm, multiplicativeEnergy_univ_left]
state_before: α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : CommGroup α
inst✝ : Fintype α
s t : Finset α
⊢ multiplicativeEnergy s univ = Fintype.card α * card s ^ 2
Theorem: LowerSet.disjoint_coe
File: Mathlib/Order/UpperLower/Basic.lean

tactic: simp [disjoint_iff, SetLike.ext'_iff]
state_before: α : Type u_1
β : Type ?u.78350
γ : Type ?u.78353
ι : Sort ?u.78356
κ : ι → Sort ?u.78361
inst✝ : LE α
S : Set (LowerSet α)
s t : LowerSet α
a : α
⊢ Disjoint ↑s ↑t ↔ Disjoint s t
Theorem: Basis.toMatrix_eq_toMatrix_constr
File: Mathlib/LinearAlgebra/Matrix/Basis.lean

tactic: ext
state_before: ι : Type u_1
ι' : Type ?u.55138
κ : Type ?u.55141
κ' : Type ?u.55144
R : Type u_2
M : Type u_3
inst✝⁷ : CommSemiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : Module R M
R₂ : Type ?u.55337
M₂ : Type ?u.55340
inst✝⁴ : CommRing R₂
inst✝³ : AddCommGroup M₂
inst✝² : Module R₂ M₂
e : Basis ι R M
v✝ : ι' → M
i : ι
j : ι'
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
v : ι → M
⊢ toMatrix e v = ↑(LinearMap.toMatrix e e) (↑(constr e ℕ) v)

tactic: rw [Basis.toMatrix_apply, LinearMap.toMatrix_apply, Basis.constr_basis]
state_before: case a.h
ι : Type u_1
ι' : Type ?u.55138
κ : Type ?u.55141
κ' : Type ?u.55144
R : Type u_2
M : Type u_3
inst✝⁷ : CommSemiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : Module R M
R₂ : Type ?u.55337
M₂ : Type ?u.55340
inst✝⁴ : CommRing R₂
inst✝³ : AddCommGroup M₂
inst✝² : Module R₂ M₂
e : Basis ι R M
v✝ : ι' → M
i : ι
j : ι'
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
v : ι → M
i✝ x✝ : ι
⊢ toMatrix e v i✝ x✝ = ↑(LinearMap.toMatrix e e) (↑(constr e ℕ) v) i✝ x✝
Theorem: Filter.inv_le_iff_le_inv
File: Mathlib/Order/Filter/Pointwise.lean

tactic: rw [← Filter.inv_le_inv_iff, inv_inv]
state_before: F : Type ?u.32470
α : Type u_1
β : Type ?u.32476
γ : Type ?u.32479
δ : Type ?u.32482
ε : Type ?u.32485
inst✝ : InvolutiveInv α
f g : Filter α
s : Set α
⊢ f⁻¹ ≤ g ↔ f ≤ g⁻¹
Theorem: PartENat.coe_le_iff
File: Mathlib/Data/Nat/PartENat.lean

tactic: rw [← some_eq_natCast]
state_before: n : ℕ
x : PartENat
⊢ ↑n ≤ x ↔ ∀ (h : x.Dom), n ≤ Part.get x h

tactic: simp only [le_def, exists_prop_of_true, dom_some, forall_true_iff]
state_before: n : ℕ
x : PartENat
⊢ ↑n ≤ x ↔ ∀ (h : x.Dom), n ≤ Part.get x h

tactic: rfl
state_before: n : ℕ
x : PartENat
⊢ (∀ (hy : x.Dom), Part.get ↑n (_ : (↑n).Dom) ≤ Part.get x hy) ↔ ∀ (h : x.Dom), n ≤ Part.get x h
Theorem: FractionalIdeal.mul_self_le_self
File: Mathlib/RingTheory/FractionalIdeal.lean

tactic: convert mul_left_mono I hI
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 : FractionalIdeal S P
hI : I ≤ 1
⊢ I * I ≤ I

tactic: exact (mul_one I).symm
state_before: case h.e'_4
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 : FractionalIdeal S P
hI : I ≤ 1
⊢ I = (fun x x_1 => x * x_1) I 1
Theorem: Set.einfsep_pair
File: Mathlib/Topology/MetricSpace/Infsep.lean

tactic: nth_rw 1 [← min_self (edist x y)]
state_before: α : Type u_1
β : Type ?u.39983
inst✝ : PseudoEMetricSpace α
x y z : α
s t : Set α
hxy : x ≠ y
⊢ einfsep {x, y} = edist x y

tactic: convert einfsep_pair_eq_inf hxy using 2
state_before: α : Type u_1
β : Type ?u.39983
inst✝ : PseudoEMetricSpace α
x y z : α
s t : Set α
hxy : x ≠ y
⊢ einfsep {x, y} = min (edist x y) (edist x y)

tactic: rw [edist_comm]
state_before: case h.e'_3.h.e'_2
α : Type u_1
β : Type ?u.39983
inst✝ : PseudoEMetricSpace α
x y z : α
s t : Set α
hxy : x ≠ y
⊢ edist x y = edist y x
Theorem: Polynomial.cyclotomic_dvd_geom_sum_of_dvd
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean

tactic: suffices cyclotomic d ℤ ∣ ∑ i in Finset.range n, X ^ i by
  simpa only [map_cyclotomic_int, Polynomial.map_sum, Polynomial.map_pow, Polynomial.map_X] using
    map_dvd (Int.castRingHom R) this
state_before: R : Type u_1
inst✝ : Ring R
d n : ℕ
hdn : d ∣ n
hd : d ≠ 1
⊢ cyclotomic d R ∣ ∑ i in range n, X ^ i

tactic: rcases n.eq_zero_or_pos with (rfl | hn)
state_before: R : Type u_1
inst✝ : Ring R
d n : ℕ
hdn : d ∣ n
hd : d ≠ 1
⊢ cyclotomic d ℤ ∣ ∑ i in range n, X ^ i

tactic: rw [← prod_cyclotomic_eq_geom_sum hn]
state_before: case inr
R : Type u_1
inst✝ : Ring R
d n : ℕ
hdn : d ∣ n
hd : d ≠ 1
hn : n > 0
⊢ cyclotomic d ℤ ∣ ∑ i in range n, X ^ i

tactic: apply Finset.dvd_prod_of_mem
state_before: case inr
R : Type u_1
inst✝ : Ring R
d n : ℕ
hdn : d ∣ n
hd : d ≠ 1
hn : n > 0
⊢ cyclotomic d ℤ ∣ ∏ i in Finset.erase (Nat.divisors n) 1, cyclotomic i ℤ

tactic: simp [hd, hdn, hn.ne']
state_before: case inr.ha
R : Type u_1
inst✝ : Ring R
d n : ℕ
hdn : d ∣ n
hd : d ≠ 1
hn : n > 0
⊢ d ∈ Finset.erase (Nat.divisors n) 1

tactic: simpa only [map_cyclotomic_int, Polynomial.map_sum, Polynomial.map_pow, Polynomial.map_X] using
  map_dvd (Int.castRingHom R) this
state_before: R : Type u_1
inst✝ : Ring R
d n : ℕ
hdn : d ∣ n
hd : d ≠ 1
this : cyclotomic d ℤ ∣ ∑ i in range n, X ^ i
⊢ cyclotomic d R ∣ ∑ i in range n, X ^ i

tactic: simp
state_before: case inl
R : Type u_1
inst✝ : Ring R
d : ℕ
hd : d ≠ 1
hdn : d ∣ 0
⊢ cyclotomic d ℤ ∣ ∑ i in range 0, X ^ i
Theorem: Ideal.isUnit_of_sub_one_mem_jacobson_bot
File: Mathlib/RingTheory/JacobsonIdeal.lean

tactic: cases' exists_mul_sub_mem_of_sub_one_mem_jacobson r h with s hs
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
I : Ideal R
r : R
h : r - 1 ∈ jacobson ⊥
⊢ IsUnit r

tactic: rw [mem_bot, sub_eq_zero, mul_comm] at hs
state_before: case intro
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
I : Ideal R
r : R
h : r - 1 ∈ jacobson ⊥
s : R
hs : s * r - 1 ∈ ⊥
⊢ IsUnit r

tactic: exact isUnit_of_mul_eq_one _ _ hs
state_before: case intro
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
I : Ideal R
r : R
h : r - 1 ∈ jacobson ⊥
s : R
hs : r * s = 1
⊢ IsUnit r
Theorem: FirstOrder.Language.Substructure.FG.cg
File: Mathlib/ModelTheory/FinitelyGenerated.lean

tactic: obtain ⟨s, hf, rfl⟩ := fg_def.1 h
state_before: L : Language
M : Type u_3
inst✝ : Structure L M
N : Substructure L M
h : FG N
⊢ CG N

tactic: refine' ⟨s, hf.countable, rfl⟩
state_before: case intro.intro
L : Language
M : Type u_3
inst✝ : Structure L M
s : Set M
hf : Set.Finite s
h : FG (LowerAdjoint.toFun (closure L) s)
⊢ CG (LowerAdjoint.toFun (closure L) s)
Theorem: MvPolynomial.weightedHomogeneousComponent_eq_zero'
File: Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean

tactic: classical
rw [weightedHomogeneousComponent_apply, sum_eq_zero]
intro d hd; rw [mem_filter] at hd
exfalso; exact h _ hd.1 hd.2
state_before: R : Type u_2
M : Type u_3
inst✝¹ : CommSemiring R
σ : Type u_1
inst✝ : AddCommMonoid M
w : σ → M
n : M
φ ψ : MvPolynomial σ R
h : ∀ (d : σ →₀ ℕ), d ∈ support φ → ↑(weightedDegree' w) d ≠ n
⊢ ↑(weightedHomogeneousComponent w n) φ = 0

tactic: rw [weightedHomogeneousComponent_apply, sum_eq_zero]
state_before: R : Type u_2
M : Type u_3
inst✝¹ : CommSemiring R
σ : Type u_1
inst✝ : AddCommMonoid M
w : σ → M
n : M
φ ψ : MvPolynomial σ R
h : ∀ (d : σ →₀ ℕ), d ∈ support φ → ↑(weightedDegree' w) d ≠ n
⊢ ↑(weightedHomogeneousComponent w n) φ = 0

tactic: intro d hd
state_before: R : Type u_2
M : Type u_3
inst✝¹ : CommSemiring R
σ : Type u_1
inst✝ : AddCommMonoid M
w : σ → M
n : M
φ ψ : MvPolynomial σ R
h : ∀ (d : σ →₀ ℕ), d ∈ support φ → ↑(weightedDegree' w) d ≠ n
⊢ ∀ (x : σ →₀ ℕ), x ∈ Finset.filter (fun d => ↑(weightedDegree' w) d = n) (support φ) → ↑(monomial x) (coeff x φ) = 0

tactic: rw [mem_filter] at hd
state_before: R : Type u_2
M : Type u_3
inst✝¹ : CommSemiring R
σ : Type u_1
inst✝ : AddCommMonoid M
w : σ → M
n : M
φ ψ : MvPolynomial σ R
h : ∀ (d : σ →₀ ℕ), d ∈ support φ → ↑(weightedDegree' w) d ≠ n
d : σ →₀ ℕ
hd : d ∈ Finset.filter (fun d => ↑(weightedDegree' w) d = n) (support φ)
⊢ ↑(monomial d) (coeff d φ) = 0

tactic: exfalso
state_before: R : Type u_2
M : Type u_3
inst✝¹ : CommSemiring R
σ : Type u_1
inst✝ : AddCommMonoid M
w : σ → M
n : M
φ ψ : MvPolynomial σ R
h : ∀ (d : σ →₀ ℕ), d ∈ support φ → ↑(weightedDegree' w) d ≠ n
d : σ →₀ ℕ
hd : d ∈ support φ ∧ ↑(weightedDegree' w) d = n
⊢ ↑(monomial d) (coeff d φ) = 0

tactic: exact h _ hd.1 hd.2
state_before: case h
R : Type u_2
M : Type u_3
inst✝¹ : CommSemiring R
σ : Type u_1
inst✝ : AddCommMonoid M
w : σ → M
n : M
φ ψ : MvPolynomial σ R
h : ∀ (d : σ →₀ ℕ), d ∈ support φ → ↑(weightedDegree' w) d ≠ n
d : σ →₀ ℕ
hd : d ∈ support φ ∧ ↑(weightedDegree' w) d = n
⊢ False
Theorem: sq_le_one_iff_abs_le_one
File: Mathlib/Algebra/GroupPower/Order.lean

tactic: simpa only [one_pow, abs_one] using @sq_le_sq _ _ x 1
state_before: β : Type ?u.268169
A : Type ?u.268172
G : Type ?u.268175
M : Type ?u.268178
R : Type u_1
inst✝ : LinearOrderedRing R
x✝ y x : R
⊢ x ^ 2 ≤ 1 ↔ abs x ≤ 1
Theorem: isTotallyDisconnected_of_clopen_set
File: Mathlib/Topology/Connected.lean

tactic: rintro S - hS
state_before: α : Type u
β : Type v
ι : Type ?u.120754
π : ι → Type ?u.120759
inst✝¹ : TopologicalSpace α
s t u v : Set α
X : Type u_1
inst✝ : TopologicalSpace X
hX : Pairwise fun x y => ∃ U, IsClopen U ∧ x ∈ U ∧ ¬y ∈ U
⊢ IsTotallyDisconnected univ

tactic: unfold Set.Subsingleton
state_before: α : Type u
β : Type v
ι : Type ?u.120754
π : ι → Type ?u.120759
inst✝¹ : TopologicalSpace α
s t u v : Set α
X : Type u_1
inst✝ : TopologicalSpace X
hX : Pairwise fun x y => ∃ U, IsClopen U ∧ x ∈ U ∧ ¬y ∈ U
S : Set X
hS : IsPreconnected S
⊢ Set.Subsingleton S

tactic: by_contra' h_contra
state_before: α : Type u
β : Type v
ι : Type ?u.120754
π : ι → Type ?u.120759
inst✝¹ : TopologicalSpace α
s t u v : Set α
X : Type u_1
inst✝ : TopologicalSpace X
hX : Pairwise fun x y => ∃ U, IsClopen U ∧ x ∈ U ∧ ¬y ∈ U
S : Set X
hS : IsPreconnected S
⊢ ∀ ⦃x : X⦄, x ∈ S → ∀ ⦃y : X⦄, y ∈ S → x = y

tactic: rcases h_contra with ⟨x, hx, y, hy, hxy⟩
state_before: α : Type u
β : Type v
ι : Type ?u.120754
π : ι → Type ?u.120759
inst✝¹ : TopologicalSpace α
s t u v : Set α
X : Type u_1
inst✝ : TopologicalSpace X
hX : Pairwise fun x y => ∃ U, IsClopen U ∧ x ∈ U ∧ ¬y ∈ U
S : Set X
hS : IsPreconnected S
h_contra : Exists fun ⦃x⦄ => x ∈ S ∧ Exists fun ⦃y⦄ => y ∈ S ∧ x ≠ y
⊢ False

tactic: obtain ⟨U, h_clopen, hxU, hyU⟩ := hX hxy
state_before: case intro.intro.intro.intro
α : Type u
β : Type v
ι : Type ?u.120754
π : ι → Type ?u.120759
inst✝¹ : TopologicalSpace α
s t u v : Set α
X : Type u_1
inst✝ : TopologicalSpace X
hX : Pairwise fun x y => ∃ U, IsClopen U ∧ x ∈ U ∧ ¬y ∈ U
S : Set X
hS : IsPreconnected S
x : X
hx : x ∈ S
y : X
hy : y ∈ S
hxy : x ≠ y
⊢ False

tactic: specialize
  hS U (Uᶜ) h_clopen.1 h_clopen.compl.1 (fun a _ => em (a ∈ U)) ⟨x, hx, hxU⟩ ⟨y, hy, hyU⟩
state_before: case intro.intro.intro.intro.intro.intro.intro
α : Type u
β : Type v
ι : Type ?u.120754
π : ι → Type ?u.120759
inst✝¹ : TopologicalSpace α
s t u v : Set α
X : Type u_1
inst✝ : TopologicalSpace X
hX : Pairwise fun x y => ∃ U, IsClopen U ∧ x ∈ U ∧ ¬y ∈ U
S : Set X
hS : IsPreconnected S
x : X
hx : x ∈ S
y : X
hy : y ∈ S
hxy : x ≠ y
U : Set X
h_clopen : IsClopen U
hxU : x ∈ U
hyU : ¬y ∈ U
⊢ False

tactic: rw [inter_compl_self, Set.inter_empty] at hS
state_before: case intro.intro.intro.intro.intro.intro.intro
α : Type u
β : Type v
ι : Type ?u.120754
π : ι → Type ?u.120759
inst✝¹ : TopologicalSpace α
s t u v : Set α
X : Type u_1
inst✝ : TopologicalSpace X
hX : Pairwise fun x y => ∃ U, IsClopen U ∧ x ∈ U ∧ ¬y ∈ U
S : Set X
x : X
hx : x ∈ S
y : X
hy : y ∈ S
hxy : x ≠ y
U : Set X
h_clopen : IsClopen U
hxU : x ∈ U
hyU : ¬y ∈ U
hS : Set.Nonempty (S ∩ (U ∩ Uᶜ))
⊢ False

tactic: exact Set.not_nonempty_empty hS
state_before: case intro.intro.intro.intro.intro.intro.intro
α : Type u
β : Type v
ι : Type ?u.120754
π : ι → Type ?u.120759
inst✝¹ : TopologicalSpace α
s t u v : Set α
X : Type u_1
inst✝ : TopologicalSpace X
hX : Pairwise fun x y => ∃ U, IsClopen U ∧ x ∈ U ∧ ¬y ∈ U
S : Set X
x : X
hx : x ∈ S
y : X
hy : y ∈ S
hxy : x ≠ y
U : Set X
h_clopen : IsClopen U
hxU : x ∈ U
hyU : ¬y ∈ U
hS : Set.Nonempty ∅
⊢ False
Theorem: ContinuousMap.exists_mem_subalgebra_near_continuousMap_of_separatesPoints
File: Mathlib/Topology/ContinuousFunction/StoneWeierstrass.lean

tactic: have w :=
  mem_closure_iff_frequently.mp (continuousMap_mem_subalgebra_closure_of_separatesPoints A w f)
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
w : Subalgebra.SeparatesPoints A
f : C(X, ℝ)
ε : ℝ
pos : 0 < ε
⊢ ∃ g, ‖↑g - f‖ < ε

tactic: rw [Metric.nhds_basis_ball.frequently_iff] at w
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
w✝ : Subalgebra.SeparatesPoints A
f : C(X, ℝ)
ε : ℝ
pos : 0 < ε
w : ∃ᶠ (x : C(X, ℝ)) in 𝓝 f, x ∈ ↑A
⊢ ∃ g, ‖↑g - f‖ < ε

tactic: obtain ⟨g, H, m⟩ := w ε pos
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
w✝ : Subalgebra.SeparatesPoints A
f : C(X, ℝ)
ε : ℝ
pos : 0 < ε
w : ∀ (i : ℝ), 0 < i → ∃ x, x ∈ Metric.ball f i ∧ x ∈ ↑A
⊢ ∃ g, ‖↑g - f‖ < ε

tactic: rw [Metric.mem_ball, dist_eq_norm] at H
state_before: case intro.intro
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
w✝ : Subalgebra.SeparatesPoints A
f : C(X, ℝ)
ε : ℝ
pos : 0 < ε
w : ∀ (i : ℝ), 0 < i → ∃ x, x ∈ Metric.ball f i ∧ x ∈ ↑A
g : C(X, ℝ)
H : g ∈ Metric.ball f ε
m : g ∈ ↑A
⊢ ∃ g, ‖↑g - f‖ < ε

tactic: exact ⟨⟨g, m⟩, H⟩
state_before: case intro.intro
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : CompactSpace X
A : Subalgebra ℝ C(X, ℝ)
w✝ : Subalgebra.SeparatesPoints A
f : C(X, ℝ)
ε : ℝ
pos : 0 < ε
w : ∀ (i : ℝ), 0 < i → ∃ x, x ∈ Metric.ball f i ∧ x ∈ ↑A
g : C(X, ℝ)
H : ‖g - f‖ < ε
m : g ∈ ↑A
⊢ ∃ g, ‖↑g - f‖ < ε