tasksource/leandojo huggingface dataset:
Theorem: Polynomial.smul_eval_smul
File: Mathlib/Algebra/Polynomial/GroupRingAction.lean

tactic: rw [smul_C, eval_C, eval_C]
state_before: M : Type u_2
inst✝⁴ : Monoid M
R : Type ?u.35641
inst✝³ : Semiring R
inst✝² : MulSemiringAction M R
S : Type u_1
inst✝¹ : CommSemiring S
inst✝ : MulSemiringAction M S
m : M
f : S[X]
x r : S
⊢ eval (m • x) (m • ↑C r) = m • eval x (↑C r)

tactic: rw [smul_add, eval_add, ihf, ihg, eval_add, smul_add]
state_before: M : Type u_2
inst✝⁴ : Monoid M
R : Type ?u.35641
inst✝³ : Semiring R
inst✝² : MulSemiringAction M R
S : Type u_1
inst✝¹ : CommSemiring S
inst✝ : MulSemiringAction M S
m : M
f✝ : S[X]
x : S
f g : S[X]
ihf : eval (m • x) (m • f) = m • eval x f
ihg : eval (m • x) (m • g) = m • eval x g
⊢ eval (m • x) (m • (f + g)) = m • eval x (f + g)

tactic: rw [smul_mul', smul_pow', smul_C, smul_X, eval_mul, eval_C, eval_pow, eval_X, eval_mul, eval_C,
  eval_pow, eval_X, smul_mul', smul_pow']
state_before: M : Type u_2
inst✝⁴ : Monoid M
R : Type ?u.35641
inst✝³ : Semiring R
inst✝² : MulSemiringAction M R
S : Type u_1
inst✝¹ : CommSemiring S
inst✝ : MulSemiringAction M S
m : M
f : S[X]
x : S
n : ℕ
r : S
x✝ : eval (m • x) (m • (↑C r * X ^ n)) = m • eval x (↑C r * X ^ n)
⊢ eval (m • x) (m • (↑C r * X ^ (n + 1))) = m • eval x (↑C r * X ^ (n + 1))
Theorem: Complex.sin_eq_zero_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean

tactic: rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff]
state_before: θ : ℂ
⊢ sin θ = 0 ↔ ∃ k, θ = ↑k * ↑π

tactic: constructor
state_before: θ : ℂ
⊢ (∃ k, θ - ↑π / 2 = (2 * ↑k + 1) * ↑π / 2) ↔ ∃ k, θ = ↑k * ↑π

tactic: rintro ⟨k, hk⟩
state_before: case mp
θ : ℂ
⊢ (∃ k, θ - ↑π / 2 = (2 * ↑k + 1) * ↑π / 2) → ∃ k, θ = ↑k * ↑π

tactic: use k + 1
state_before: case mp.intro
θ : ℂ
k : ℤ
hk : θ - ↑π / 2 = (2 * ↑k + 1) * ↑π / 2
⊢ ∃ k, θ = ↑k * ↑π

tactic: field_simp [eq_add_of_sub_eq hk]
state_before: case mp.intro
θ : ℂ
k : ℤ
hk : θ - ↑π / 2 = (2 * ↑k + 1) * ↑π / 2
⊢ θ = ↑(k + 1) * ↑π

tactic: ring
state_before: case mp.intro
θ : ℂ
k : ℤ
hk : θ - ↑π / 2 = (2 * ↑k + 1) * ↑π / 2
⊢ (2 * ↑k + 1) * ↑π + ↑π = (↑k + 1) * ↑π * 2

tactic: rintro ⟨k, rfl⟩
state_before: case mpr
θ : ℂ
⊢ (∃ k, θ = ↑k * ↑π) → ∃ k, θ - ↑π / 2 = (2 * ↑k + 1) * ↑π / 2

tactic: use k - 1
state_before: case mpr.intro
k : ℤ
⊢ ∃ k_1, ↑k * ↑π - ↑π / 2 = (2 * ↑k_1 + 1) * ↑π / 2

tactic: field_simp
state_before: case mpr.intro
k : ℤ
⊢ ↑k * ↑π - ↑π / 2 = (2 * ↑(k - 1) + 1) * ↑π / 2

tactic: ring
state_before: case mpr.intro
k : ℤ
⊢ ↑k * ↑π * 2 - ↑π = (2 * (↑k - 1) + 1) * ↑π
Theorem: Function.Injective.compl_image_eq
File: Mathlib/Data/Set/Image.lean

tactic: ext y
state_before: ι : Sort ?u.105472
α : Type u_1
β : Type u_2
f : α → β
hf : Injective f
s : Set α
⊢ (f '' s)ᶜ = f '' sᶜ ∪ range fᶜ

tactic: rcases em (y ∈ range f) with (⟨x, rfl⟩ | hx)
state_before: case h
ι : Sort ?u.105472
α : Type u_1
β : Type u_2
f : α → β
hf : Injective f
s : Set α
y : β
⊢ y ∈ (f '' s)ᶜ ↔ y ∈ f '' sᶜ ∪ range fᶜ

tactic: simp [hf.eq_iff]
state_before: case h.inl.intro
ι : Sort ?u.105472
α : Type u_1
β : Type u_2
f : α → β
hf : Injective f
s : Set α
x : α
⊢ f x ∈ (f '' s)ᶜ ↔ f x ∈ f '' sᶜ ∪ range fᶜ

tactic: rw [mem_range, not_exists] at hx
state_before: case h.inr
ι : Sort ?u.105472
α : Type u_1
β : Type u_2
f : α → β
hf : Injective f
s : Set α
y : β
hx : ¬y ∈ range f
⊢ y ∈ (f '' s)ᶜ ↔ y ∈ f '' sᶜ ∪ range fᶜ

tactic: simp [hx]
state_before: case h.inr
ι : Sort ?u.105472
α : Type u_1
β : Type u_2
f : α → β
hf : Injective f
s : Set α
y : β
hx : ∀ (x : α), ¬f x = y
⊢ y ∈ (f '' s)ᶜ ↔ y ∈ f '' sᶜ ∪ range fᶜ
Theorem: Ordnode.equiv_iff
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: rw [← length_toList h₁, h, length_toList h₂]
state_before: α : Type u_1
t₁ t₂ : Ordnode α
h₁ : Sized t₁
h₂ : Sized t₂
h : toList t₁ = toList t₂
⊢ size t₁ = size t₂
Theorem: hasFDerivAt_ring_inverse
File: Mathlib/Analysis/Calculus/FDeriv/Mul.lean

tactic: simpa [hasFDerivAt_iff_isLittleO_nhds_zero] using this
state_before: 𝕜 : Type u_2
inst✝¹¹ : NontriviallyNormedField 𝕜
E : Type ?u.1084130
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace 𝕜 E
F : Type ?u.1084230
inst✝⁸ : NormedAddCommGroup F
inst✝⁷ : NormedSpace 𝕜 F
G : Type ?u.1084325
inst✝⁶ : NormedAddCommGroup G
inst✝⁵ : NormedSpace 𝕜 G
G' : Type ?u.1084420
inst✝⁴ : NormedAddCommGroup G'
inst✝³ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x✝ : E
s t : Set E
L L₁ L₂ : Filter E
R : Type u_1
inst✝² : NormedRing R
inst✝¹ : NormedAlgebra 𝕜 R
inst✝ : CompleteSpace R
x : Rˣ
this : (fun t => Ring.inverse (↑x + t) - ↑x⁻¹ + ↑x⁻¹ * t * ↑x⁻¹) =o[𝓝 0] _root_.id
⊢ HasFDerivAt Ring.inverse (-↑(↑(mulLeftRight 𝕜 R) ↑x⁻¹) ↑x⁻¹) ↑x
Theorem: Ideal.ideal_prod_prime_aux
File: Mathlib/RingTheory/Ideal/Prod.lean

tactic: contrapose!
state_before: R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
⊢ IsPrime (prod I J) → I = ⊤ ∨ J = ⊤

tactic: simp only [ne_top_iff_one, isPrime_iff, not_and, not_forall, not_or]
state_before: R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
⊢ I ≠ ⊤ ∧ J ≠ ⊤ → ¬IsPrime (prod I J)

tactic: exact fun ⟨hI, hJ⟩ _ => ⟨⟨0, 1⟩, ⟨1, 0⟩, by simp, by simp [hJ], by simp [hI]⟩
state_before: R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
⊢ ¬1 ∈ I ∧ ¬1 ∈ J → ¬1 ∈ prod I J → ∃ x x_1 h, ¬x ∈ prod I J ∧ ¬x_1 ∈ prod I J

tactic: simp
state_before: R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
x✝¹ : ¬1 ∈ I ∧ ¬1 ∈ J
x✝ : ¬1 ∈ prod I J
hI : ¬1 ∈ I
hJ : ¬1 ∈ J
⊢ (0, 1) * (1, 0) ∈ prod I J

tactic: simp [hJ]
state_before: R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
x✝¹ : ¬1 ∈ I ∧ ¬1 ∈ J
x✝ : ¬1 ∈ prod I J
hI : ¬1 ∈ I
hJ : ¬1 ∈ J
⊢ ¬(0, 1) ∈ prod I J

tactic: simp [hI]
state_before: R : Type u
S : Type v
inst✝¹ : Ring R
inst✝ : Ring S
I✝ I' : Ideal R
J✝ J' : Ideal S
I : Ideal R
J : Ideal S
x✝¹ : ¬1 ∈ I ∧ ¬1 ∈ J
x✝ : ¬1 ∈ prod I J
hI : ¬1 ∈ I
hJ : ¬1 ∈ J
⊢ ¬(1, 0) ∈ prod I J
Theorem: CategoryTheory.GrothendieckTopology.plusMap_comp
File: Mathlib/CategoryTheory/Sites/Plus.lean

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

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

tactic: simp [plusMap, J.diagramNatTrans_comp]
state_before: case w.h
C : Type u
inst✝³ : Category C
J : GrothendieckTopology C
D : Type w
inst✝² : Category D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
P Q R : Cᵒᵖ ⥤ D
η : P ⟶ Q
γ : Q ⟶ R
x✝ : Cᵒᵖ
S : (Cover J x✝.unop)ᵒᵖ
⊢ colimit.ι (diagram J P x✝.unop) S ≫ (plusMap J (η ≫ γ)).app x✝ =
    colimit.ι (diagram J P x✝.unop) S ≫ (plusMap J η ≫ plusMap J γ).app x✝
Theorem: Equiv.Perm.subtypeCongr.right_apply
File: Mathlib/Logic/Equiv/Basic.lean

tactic: simp [Perm.subtypeCongr.apply, h]
state_before: ε : Type u_1
p : ε → Prop
inst✝ : DecidablePred p
ep ep' : Perm { a // p a }
en en' : Perm { a // ¬p a }
a : ε
h : ¬p a
⊢ ↑(subtypeCongr ep en) a = ↑(↑en { val := a, property := h })
Theorem: Finsupp.comapDomain_zero
File: Mathlib/Data/Finsupp/Basic.lean

tactic: ext
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.304416
ι : Type ?u.304419
M : Type u_3
M' : Type ?u.304425
N : Type ?u.304428
P : Type ?u.304431
G : Type ?u.304434
H : Type ?u.304437
R : Type ?u.304440
S : Type ?u.304443
inst✝ : Zero M
f : α → β
hif : optParam (Set.InjOn f (f ⁻¹' ↑0.support)) (_ : Set.InjOn f (f ⁻¹' ↑∅))
⊢ comapDomain f 0 hif = 0

tactic: rfl
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.304416
ι : Type ?u.304419
M : Type u_3
M' : Type ?u.304425
N : Type ?u.304428
P : Type ?u.304431
G : Type ?u.304434
H : Type ?u.304437
R : Type ?u.304440
S : Type ?u.304443
inst✝ : Zero M
f : α → β
hif : optParam (Set.InjOn f (f ⁻¹' ↑0.support)) (_ : Set.InjOn f (f ⁻¹' ↑∅))
a✝ : α
⊢ ↑(comapDomain f 0 hif) a✝ = ↑0 a✝
Theorem: sbtw_iff_not_btw
File: Mathlib/Order/Circular.lean

tactic: rw [sbtw_iff_btw_not_btw]
state_before: α : Type u_1
inst✝ : CircularOrder α
a b c : α
⊢ sbtw a b c ↔ ¬btw c b a

tactic: exact and_iff_right_of_imp (btw_total _ _ _).resolve_left
state_before: α : Type u_1
inst✝ : CircularOrder α
a b c : α
⊢ btw a b c ∧ ¬btw c b a ↔ ¬btw c b a
Theorem: List.get_range
File: Std/Data/List/Lemmas.lean

tactic: rw [← get?_eq_get _, get?_range (by simpa using H)]
state_before: n i : Nat
H : i < length (range n)
⊢ some (get (range n) { val := i, isLt := H }) = some i

tactic: simpa using H
state_before: n i : Nat
H : i < length (range n)
⊢ i < n
Theorem: MeasureTheory.VectorMeasure.map_add
File: Mathlib/MeasureTheory/Measure/VectorMeasure.lean

tactic: by_cases hf : Measurable f
state_before: α : Type u_1
β : Type u_3
m inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace β
M : Type u_2
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
v✝ : VectorMeasure α M
inst✝ : ContinuousAdd M
v w : VectorMeasure α M
f : α → β
⊢ map (v + w) f = map v f + map w f

tactic: ext i
state_before: case pos
α : Type u_1
β : Type u_3
m inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace β
M : Type u_2
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
v✝ : VectorMeasure α M
inst✝ : ContinuousAdd M
v w : VectorMeasure α M
f : α → β
hf : Measurable f
⊢ map (v + w) f = map v f + map w f

tactic: intro hi
state_before: case pos.h
α : Type u_1
β : Type u_3
m inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace β
M : Type u_2
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
v✝ : VectorMeasure α M
inst✝ : ContinuousAdd M
v w : VectorMeasure α M
f : α → β
hf : Measurable f
i : Set β
⊢ MeasurableSet i → ↑(map (v + w) f) i = ↑(map v f + map w f) i

tactic: simp [map_apply _ hf hi]
state_before: case pos.h
α : Type u_1
β : Type u_3
m inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace β
M : Type u_2
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
v✝ : VectorMeasure α M
inst✝ : ContinuousAdd M
v w : VectorMeasure α M
f : α → β
hf : Measurable f
i : Set β
hi : MeasurableSet i
⊢ ↑(map (v + w) f) i = ↑(map v f + map w f) i

tactic: simp [map, dif_neg hf]
state_before: case neg
α : Type u_1
β : Type u_3
m inst✝⁴ : MeasurableSpace α
inst✝³ : MeasurableSpace β
M : Type u_2
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
v✝ : VectorMeasure α M
inst✝ : ContinuousAdd M
v w : VectorMeasure α M
f : α → β
hf : ¬Measurable f
⊢ map (v + w) f = map v f + map w f
Theorem: Fin.pred_castSucc_succ
File: Mathlib/Data/Fin/Basic.lean

tactic: simp [eq_iff_veq]
state_before: n m : ℕ
i : Fin n
⊢ pred (↑castSucc (succ i)) (_ : ↑castSucc (succ i) ≠ 0) = ↑castSucc i
Theorem: Nat.totient_div_of_dvd
File: Mathlib/Data/Nat/Totient.lean

tactic: rcases d.eq_zero_or_pos with (rfl | hd0)
state_before: n d : ℕ
hnd : d ∣ n
⊢ φ (n / d) = Finset.card (filter (fun k => gcd n k = d) (range n))

tactic: rcases hnd with ⟨x, rfl⟩
state_before: case inr
n d : ℕ
hnd : d ∣ n
hd0 : d > 0
⊢ φ (n / d) = Finset.card (filter (fun k => gcd n k = d) (range n))

tactic: rw [Nat.mul_div_cancel_left x hd0]
state_before: case inr.intro
d : ℕ
hd0 : d > 0
x : ℕ
⊢ φ (d * x / d) = Finset.card (filter (fun k => gcd (d * x) k = d) (range (d * x)))

tactic: apply Finset.card_congr fun k _ => d * k
state_before: case inr.intro
d : ℕ
hd0 : d > 0
x : ℕ
⊢ φ x = Finset.card (filter (fun k => gcd (d * x) k = d) (range (d * x)))

tactic: simp [eq_zero_of_zero_dvd hnd]
state_before: case inl
n : ℕ
hnd : 0 ∣ n
⊢ φ (n / 0) = Finset.card (filter (fun k => gcd n k = 0) (range n))

tactic: simp only [mem_filter, mem_range, and_imp, coprime]
state_before: case inr.intro.h₁
d : ℕ
hd0 : d > 0
x : ℕ
⊢ ∀ (a : ℕ), a ∈ filter (coprime x) (range x) → d * a ∈ filter (fun k => gcd (d * x) k = d) (range (d * x))

tactic: refine' fun a ha1 ha2 => ⟨(mul_lt_mul_left hd0).2 ha1, _⟩
state_before: case inr.intro.h₁
d : ℕ
hd0 : d > 0
x : ℕ
⊢ ∀ (a : ℕ), a < x → gcd x a = 1 → d * a < d * x ∧ gcd (d * x) (d * a) = d

tactic: rw [gcd_mul_left, ha2, mul_one]
state_before: case inr.intro.h₁
d : ℕ
hd0 : d > 0
x a : ℕ
ha1 : a < x
ha2 : gcd x a = 1
⊢ gcd (d * x) (d * a) = d

tactic: simp [hd0.ne']
state_before: case inr.intro.h₂
d : ℕ
hd0 : d > 0
x : ℕ
⊢ ∀ (a b : ℕ), a ∈ filter (coprime x) (range x) → b ∈ filter (coprime x) (range x) → d * a = d * b → a = b

tactic: simp only [mem_filter, mem_range, exists_prop, and_imp]
state_before: case inr.intro.h₃
d : ℕ
hd0 : d > 0
x : ℕ
⊢ ∀ (b : ℕ), b ∈ filter (fun k => gcd (d * x) k = d) (range (d * x)) → ∃ a ha, d * a = b

tactic: refine' fun b hb1 hb2 => _
state_before: case inr.intro.h₃
d : ℕ
hd0 : d > 0
x : ℕ
⊢ ∀ (b : ℕ), b < d * x → gcd (d * x) b = d → ∃ a, (a < x ∧ coprime x a) ∧ d * a = b

tactic: have : d ∣ b := by
  rw [← hb2]
  apply gcd_dvd_right
state_before: case inr.intro.h₃
d : ℕ
hd0 : d > 0
x b : ℕ
hb1 : b < d * x
hb2 : gcd (d * x) b = d
⊢ ∃ a, (a < x ∧ coprime x a) ∧ d * a = b

tactic: rcases this with ⟨q, rfl⟩
state_before: case inr.intro.h₃
d : ℕ
hd0 : d > 0
x b : ℕ
hb1 : b < d * x
hb2 : gcd (d * x) b = d
this : d ∣ b
⊢ ∃ a, (a < x ∧ coprime x a) ∧ d * a = b

tactic: refine' ⟨q, ⟨⟨(mul_lt_mul_left hd0).1 hb1, _⟩, rfl⟩⟩
state_before: case inr.intro.h₃.intro
d : ℕ
hd0 : d > 0
x q : ℕ
hb1 : d * q < d * x
hb2 : gcd (d * x) (d * q) = d
⊢ ∃ a, (a < x ∧ coprime x a) ∧ d * a = d * q

tactic: rwa [gcd_mul_left, mul_right_eq_self_iff hd0] at hb2
state_before: case inr.intro.h₃.intro
d : ℕ
hd0 : d > 0
x q : ℕ
hb1 : d * q < d * x
hb2 : gcd (d * x) (d * q) = d
⊢ coprime x q

tactic: rw [← hb2]
state_before: d : ℕ
hd0 : d > 0
x b : ℕ
hb1 : b < d * x
hb2 : gcd (d * x) b = d
⊢ d ∣ b

tactic: apply gcd_dvd_right
state_before: d : ℕ
hd0 : d > 0
x b : ℕ
hb1 : b < d * x
hb2 : gcd (d * x) b = d
⊢ gcd (d * x) b ∣ b
Theorem: List.last_eq_of_concat_eq
File: Mathlib/Data/List/Basic.lean

tactic: intro h
state_before: ι : Type ?u.24637
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a b : α
l : List α
⊢ concat l a = concat l b → a = b

tactic: rw [concat_eq_append, concat_eq_append] at h
state_before: ι : Type ?u.24637
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a b : α
l : List α
h : concat l a = concat l b
⊢ a = b

tactic: exact head_eq_of_cons_eq (append_left_cancel h)
state_before: ι : Type ?u.24637
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a b : α
l : List α
h : l ++ [a] = l ++ [b]
⊢ a = b
Theorem: Set.preimage_add_const_Ioo
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [← Ioi_inter_Iio]
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ (fun x => x + a) ⁻¹' Ioo b c = Ioo (b - a) (c - a)
Theorem: LieSubmodule.Quotient.mk'_ker
File: Mathlib/Algebra/Lie/Quotient.lean

tactic: ext
state_before: R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N N' : LieSubmodule R L M
I J : LieIdeal R L
⊢ LieModuleHom.ker (mk' N) = N

tactic: simp
state_before: case h
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N N' : LieSubmodule R L M
I J : LieIdeal R L
m✝ : M
⊢ m✝ ∈ LieModuleHom.ker (mk' N) ↔ m✝ ∈ N
Theorem: Nat.le_div_iff_mul_le
File: Std/Data/Nat/Lemmas.lean

tactic: induction y, k using mod.inductionOn generalizing x with
  (rw [div_eq]; simp [h]; cases x with simp [zero_le] | succ x => ?_)
| base y k h =>
  simp [not_succ_le_zero x, succ_mul, Nat.add_comm]
  refine Nat.lt_of_lt_of_le ?_ (Nat.le_add_right ..)
  exact Nat.not_le.1 fun h' => h ⟨k0, h'⟩
| ind y k h IH =>
  rw [← add_one, Nat.add_le_add_iff_le_right, IH k0, succ_mul,
      ← Nat.add_sub_cancel (x*k) k, Nat.sub_le_sub_right_iff h.2, Nat.add_sub_cancel]
state_before: k x y : Nat
k0 : 0 < k
⊢ x ≤ y / k ↔ x * k ≤ y

tactic: rw [div_eq]
state_before: case ind
y k : Nat
h : 0 < k ∧ k ≤ y
IH : ∀ {x : Nat}, 0 < k → (x ≤ (y - k) / k ↔ x * k ≤ y - k)
x : Nat
k0 : 0 < k
⊢ x ≤ y / k ↔ x * k ≤ y

tactic: simp [h]
state_before: case ind
y k : Nat
h : 0 < k ∧ k ≤ y
IH : ∀ {x : Nat}, 0 < k → (x ≤ (y - k) / k ↔ x * k ≤ y - k)
x : Nat
k0 : 0 < k
⊢ (x ≤ if 0 < k ∧ k ≤ y then (y - k) / k + 1 else 0) ↔ x * k ≤ y

tactic: cases x with simp [zero_le] | succ x => ?_
state_before: case ind
y k : Nat
h : 0 < k ∧ k ≤ y
IH : ∀ {x : Nat}, 0 < k → (x ≤ (y - k) / k ↔ x * k ≤ y - k)
x : Nat
k0 : 0 < k
⊢ x ≤ (y - k) / k + 1 ↔ x * k ≤ y

tactic: simp [not_succ_le_zero x, succ_mul, Nat.add_comm]
state_before: case base.succ
y k : Nat
h : ¬(0 < k ∧ k ≤ y)
k0 : 0 < k
x : Nat
⊢ y < succ x * k

tactic: refine Nat.lt_of_lt_of_le ?_ (Nat.le_add_right ..)
state_before: case base.succ
y k : Nat
h : ¬(0 < k ∧ k ≤ y)
k0 : 0 < k
x : Nat
⊢ y < k + x * k

tactic: exact Nat.not_le.1 fun h' => h ⟨k0, h'⟩
state_before: case base.succ
y k : Nat
h : ¬(0 < k ∧ k ≤ y)
k0 : 0 < k
x : Nat
⊢ y < k

tactic: rw [← add_one, Nat.add_le_add_iff_le_right, IH k0, succ_mul,
    ← Nat.add_sub_cancel (x*k) k, Nat.sub_le_sub_right_iff h.2, Nat.add_sub_cancel]
state_before: case ind.succ
y k : Nat
h : 0 < k ∧ k ≤ y
IH : ∀ {x : Nat}, 0 < k → (x ≤ (y - k) / k ↔ x * k ≤ y - k)
k0 : 0 < k
x : Nat
⊢ succ x ≤ (y - k) / k + 1 ↔ succ x * k ≤ y
Theorem: Qpf.Wequiv.refl
File: Mathlib/Data/QPF/Univariate/Basic.lean

tactic: cases' x with a f
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
x : PFunctor.W (P F)
⊢ Wequiv x x

tactic: exact Wequiv.abs a f a f rfl
state_before: case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
a : (P F).A
f : PFunctor.B (P F) a → WType (P F).B
⊢ Wequiv (WType.mk a f) (WType.mk a f)
Theorem: Fin.card_Ioi
File: Mathlib/Data/Fin/Interval.lean

tactic: rw [← card_map, map_valEmbedding_Ioi, Nat.card_Ioc]
state_before: n : ℕ
a b : Fin n
⊢ card (Ioi a) = n - 1 - ↑a

tactic: assumption
state_before: case b
n : ℕ
a b : Fin n
⊢ Fin n
Theorem: OrthogonalFamily.summable_of_lp
File: Mathlib/Analysis/InnerProductSpace/l2Space.lean

tactic: rw [hV.summable_iff_norm_sq_summable]
state_before: ι : Type u_1
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type u_2
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
V : (i : ι) → G i →ₗᵢ[𝕜] E
hV : OrthogonalFamily 𝕜 G V
f : { x // x ∈ lp G 2 }
⊢ Summable fun i => ↑(V i) (↑f i)

tactic: convert (lp.memℓp f).summable _
state_before: ι : Type u_1
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type u_2
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
V : (i : ι) → G i →ₗᵢ[𝕜] E
hV : OrthogonalFamily 𝕜 G V
f : { x // x ∈ lp G 2 }
⊢ Summable fun i => ‖↑f i‖ ^ 2

tactic: norm_cast
state_before: case h.e'_5.h
ι : Type u_1
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type u_2
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
V : (i : ι) → G i →ₗᵢ[𝕜] E
hV : OrthogonalFamily 𝕜 G V
f : { x // x ∈ lp G 2 }
x✝ : ι
⊢ ‖↑f x✝‖ ^ 2 = ‖↑f x✝‖ ^ ENNReal.toReal 2

tactic: norm_num
state_before: ι : Type u_1
𝕜 : Type u_4
inst✝⁴ : IsROrC 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type u_2
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
V : (i : ι) → G i →ₗᵢ[𝕜] E
hV : OrthogonalFamily 𝕜 G V
f : { x // x ∈ lp G 2 }
⊢ 0 < ENNReal.toReal 2
Theorem: IsHilbertSum.linearIsometryEquiv_apply_dfinsupp_sum_single
File: Mathlib/Analysis/InnerProductSpace/l2Space.lean

tactic: rw [← hV.linearIsometryEquiv_symm_apply_dfinsupp_sum_single]
state_before: ι : Type u_1
𝕜 : Type u_2
inst✝⁴ : IsROrC 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type u_4
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
V : (i : ι) → G i →ₗᵢ[𝕜] E
F : ι → Submodule 𝕜 E
hV : IsHilbertSum 𝕜 G V
W₀ : Π₀ (i : ι), G i
⊢ ↑(↑(linearIsometryEquiv hV) (Dfinsupp.sum W₀ fun i => ↑(V i))) = ↑W₀

tactic: rw [LinearIsometryEquiv.apply_symm_apply]
state_before: ι : Type u_1
𝕜 : Type u_2
inst✝⁴ : IsROrC 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type u_4
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
V : (i : ι) → G i →ₗᵢ[𝕜] E
F : ι → Submodule 𝕜 E
hV : IsHilbertSum 𝕜 G V
W₀ : Π₀ (i : ι), G i
⊢ ↑(↑(linearIsometryEquiv hV) (↑(LinearIsometryEquiv.symm (linearIsometryEquiv hV)) (Dfinsupp.sum W₀ (lp.single 2)))) =
    ↑W₀

tactic: ext i
state_before: ι : Type u_1
𝕜 : Type u_2
inst✝⁴ : IsROrC 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type u_4
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
V : (i : ι) → G i →ₗᵢ[𝕜] E
F : ι → Submodule 𝕜 E
hV : IsHilbertSum 𝕜 G V
W₀ : Π₀ (i : ι), G i
⊢ ↑(Dfinsupp.sum W₀ (lp.single 2)) = ↑W₀

tactic: simp (config := { contextual := true }) [Dfinsupp.sum, lp.single_apply]
state_before: case h
ι : Type u_1
𝕜 : Type u_2
inst✝⁴ : IsROrC 𝕜
E : Type u_3
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
cplt : CompleteSpace E
G : ι → Type u_4
inst✝¹ : (i : ι) → NormedAddCommGroup (G i)
inst✝ : (i : ι) → InnerProductSpace 𝕜 (G i)
V : (i : ι) → G i →ₗᵢ[𝕜] E
F : ι → Submodule 𝕜 E
hV : IsHilbertSum 𝕜 G V
W₀ : Π₀ (i : ι), G i
i : ι
⊢ ↑(Dfinsupp.sum W₀ (lp.single 2)) i = ↑W₀ i
Theorem: continuousMap_mem_polynomialFunctions_closure
File: Mathlib/Topology/ContinuousFunction/Weierstrass.lean

tactic: rw [polynomialFunctions_closure_eq_top _ _]
state_before: a b : ℝ
f : C(↑(Set.Icc a b), ℝ)
⊢ f ∈ Subalgebra.topologicalClosure (polynomialFunctions (Set.Icc a b))

tactic: simp
state_before: a b : ℝ
f : C(↑(Set.Icc a b), ℝ)
⊢ f ∈ ⊤
Theorem: GaloisInsertion.l_inf_u
File: Mathlib/Order/GaloisConnection.lean

tactic: simp only [gi.l_u_eq]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
κ : ι → Sort ?u.39919
a✝ a₁ a₂ : α
b✝ b₁ b₂ : β
l : α → β
u : β → α
inst✝¹ : SemilatticeInf α
inst✝ : SemilatticeInf β
gi : GaloisInsertion l u
a b : β
⊢ l (u (a ⊓ b)) = a ⊓ b
Theorem: Rat.eq_iff_mul_eq_mul
File: Mathlib/Data/Rat/Defs.lean

tactic: conv =>
  lhs
  rw [← @num_den p, ← @num_den q]
state_before: a b c p q : ℚ
⊢ p = q ↔ p.num * ↑q.den = q.num * ↑p.den

tactic: rw [← Nat.cast_zero, Ne, Int.ofNat_inj]
state_before: case z₂
a b c p q : ℚ
⊢ ↑q.den ≠ 0

tactic: apply den_nz
state_before: case z₂
a b c p q : ℚ
⊢ ¬q.den = 0
Theorem: SimpleGraph.Walk.copy_nil
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: subst_vars
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u u' : V
hu : u = u'
⊢ Walk.copy nil hu hu = nil

tactic: rfl
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u' : V
⊢ Walk.copy nil (_ : u' = u') (_ : u' = u') = nil