tasksource/leandojo huggingface dataset:
Theorem: Set.Iio_union_Ico'
File: Mathlib/Data/Set/Intervals/Basic.lean

tactic: ext1 x
state_before: α : Type u_1
β : Type ?u.96699
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c ≤ b
⊢ Iio b ∪ Ico c d = Iio (max b d)

tactic: simp_rw [mem_union, mem_Iio, mem_Ico, lt_max_iff]
state_before: case h
α : Type u_1
β : Type ?u.96699
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c ≤ b
x : α
⊢ x ∈ Iio b ∪ Ico c d ↔ x ∈ Iio (max b d)

tactic: by_cases hc : c ≤ x
state_before: case h
α : Type u_1
β : Type ?u.96699
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c ≤ b
x : α
⊢ x < b ∨ c ≤ x ∧ x < d ↔ x < b ∨ x < d

tactic: simp only [hc, true_and]
state_before: case pos
α : Type u_1
β : Type ?u.96699
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c ≤ b
x : α
hc : c ≤ x
⊢ x < b ∨ c ≤ x ∧ x < d ↔ x < b ∨ x < d

tactic: have hxb : x < b := (lt_of_not_ge hc).trans_le h₁
state_before: case neg
α : Type u_1
β : Type ?u.96699
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c ≤ b
x : α
hc : ¬c ≤ x
⊢ x < b ∨ c ≤ x ∧ x < d ↔ x < b ∨ x < d

tactic: simp only [hxb, true_or]
state_before: case neg
α : Type u_1
β : Type ?u.96699
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c ≤ b
x : α
hc : ¬c ≤ x
hxb : x < b
⊢ x < b ∨ c ≤ x ∧ x < d ↔ x < b ∨ x < d
Theorem: Submodule.range_ofLe
File: Mathlib/LinearAlgebra/Basic.lean

tactic: rw [← map_top, ofLe, LinearMap.map_codRestrict, map_top, range_subtype]
state_before: R : Type u_1
R₁ : Type ?u.1546983
R₂ : Type ?u.1546986
R₃ : Type ?u.1546989
R₄ : Type ?u.1546992
S : Type ?u.1546995
K : Type ?u.1546998
K₂ : Type ?u.1547001
M : Type u_2
M' : Type ?u.1547007
M₁ : Type ?u.1547010
M₂ : Type ?u.1547013
M₃ : Type ?u.1547016
M₄ : Type ?u.1547019
N : Type ?u.1547022
N₂ : Type ?u.1547025
ι : Type ?u.1547028
V : Type ?u.1547031
V₂ : Type ?u.1547034
inst✝⁵ : Semiring R
inst✝⁴ : Semiring R₂
inst✝³ : AddCommMonoid M
inst✝² : AddCommMonoid M₂
inst✝¹ : Module R M
inst✝ : Module R₂ M₂
p✝ p' : Submodule R M
q✝ : Submodule R₂ M₂
τ₁₂ : R →+* R₂
F : Type ?u.1547208
sc : SemilinearMapClass F τ₁₂ M M₂
p q : Submodule R M
h : p ≤ q
⊢ range (ofLe h) = comap (Submodule.subtype q) p
Theorem: Complex.cpow_two
File: Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean

tactic: rw [← cpow_nat_cast]
state_before: x : ℂ
⊢ x ^ 2 = x ^ 2

tactic: simp only [Nat.cast_ofNat]
state_before: x : ℂ
⊢ x ^ 2 = x ^ ↑2
Theorem: Odd.ne_two_of_dvd_nat
File: Mathlib/Data/Nat/Parity.lean

tactic: rintro rfl
state_before: R : Type ?u.29820
inst✝¹ : Monoid R
inst✝ : HasDistribNeg R
n✝ m n : ℕ
hn : Odd n
hm : m ∣ n
⊢ m ≠ 2

tactic: exact absurd (hn.of_dvd_nat hm) (by decide)
state_before: R : Type ?u.29820
inst✝¹ : Monoid R
inst✝ : HasDistribNeg R
n✝ n : ℕ
hn : Odd n
hm : 2 ∣ n
⊢ False

tactic: decide
state_before: R : Type ?u.29820
inst✝¹ : Monoid R
inst✝ : HasDistribNeg R
n✝ n : ℕ
hn : Odd n
hm : 2 ∣ n
⊢ ¬Odd 2
Theorem: IsLprojection.compl_mul
File: Mathlib/Analysis/NormedSpace/MStructure.lean

tactic: rw [coe_compl, sub_mul, one_mul]
state_before: X : Type u_2
inst✝² : NormedAddCommGroup X
M : Type u_1
inst✝¹ : Ring M
inst✝ : Module M X
P : { P // IsLprojection X P }
Q : M
⊢ ↑(Pᶜ) * Q = Q - ↑P * Q
Theorem: Polynomial.degree_list_sum_le
File: Mathlib/Algebra/Polynomial/BigOperators.lean

tactic: by_cases h : l.sum = 0
state_before: R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
l : List S[X]
⊢ degree (List.sum l) ≤ List.maximum (List.map natDegree l)

tactic: simp [h]
state_before: case pos
R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
l : List S[X]
h : List.sum l = 0
⊢ degree (List.sum l) ≤ List.maximum (List.map natDegree l)

tactic: rw [degree_eq_natDegree h]
state_before: case neg
R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
l : List S[X]
h : ¬List.sum l = 0
⊢ degree (List.sum l) ≤ List.maximum (List.map natDegree l)

tactic: suffices (l.map natDegree).maximum = ((l.map natDegree).foldr max 0 : ℕ) by
  rw [this]
  simpa [this, Nat.cast_withBot] using natDegree_list_sum_le l
state_before: case neg
R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
l : List S[X]
h : ¬List.sum l = 0
⊢ ↑(natDegree (List.sum l)) ≤ List.maximum (List.map natDegree l)

tactic: rw [← List.foldr_max_of_ne_nil]
state_before: case neg
R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
l : List S[X]
h : ¬List.sum l = 0
⊢ List.maximum (List.map natDegree l) = ↑(List.foldr max 0 (List.map natDegree l))

tactic: contrapose! h
state_before: case neg
R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
l : List S[X]
h : ¬List.sum l = 0
⊢ List.map natDegree l ≠ []

tactic: rw [List.map_eq_nil] at h
state_before: case neg
R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
l : List S[X]
h : List.map natDegree l = []
⊢ List.sum l = 0

tactic: simp [h]
state_before: case neg
R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
l : List S[X]
h : l = []
⊢ List.sum l = 0

tactic: rw [this]
state_before: R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
l : List S[X]
h : ¬List.sum l = 0
this : List.maximum (List.map natDegree l) = ↑(List.foldr max 0 (List.map natDegree l))
⊢ ↑(natDegree (List.sum l)) ≤ List.maximum (List.map natDegree l)

tactic: simpa [this, Nat.cast_withBot] using natDegree_list_sum_le l
state_before: R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
l : List S[X]
h : ¬List.sum l = 0
this : List.maximum (List.map natDegree l) = ↑(List.foldr max 0 (List.map natDegree l))
⊢ ↑(natDegree (List.sum l)) ≤ ↑(List.foldr max 0 (List.map natDegree l))

tactic: congr
state_before: case neg
R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
l : List S[X]
h : ¬List.sum l = 0
⊢ ↑(List.foldr max ⊥ (List.map natDegree l)) = ↑(List.foldr max 0 (List.map natDegree l))
Theorem: Polynomial.rootMultiplicity_X_sub_C_pow
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: induction' n with n hn
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
a : R
n : ℕ
⊢ rootMultiplicity a ((X - ↑C a) ^ n) = n

tactic: have hzero := pow_ne_zero n.succ (X_sub_C_ne_zero a)
state_before: case succ
R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
a : R
n : ℕ
hn : rootMultiplicity a ((X - ↑C a) ^ n) = n
⊢ rootMultiplicity a ((X - ↑C a) ^ Nat.succ n) = Nat.succ n

tactic: rw [pow_succ (X - C a) n] at hzero⊢
state_before: case succ
R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
a : R
n : ℕ
hn : rootMultiplicity a ((X - ↑C a) ^ n) = n
hzero : (X - ↑C a) ^ Nat.succ n ≠ 0
⊢ rootMultiplicity a ((X - ↑C a) ^ Nat.succ n) = Nat.succ n

tactic: simp only [rootMultiplicity_mul hzero, rootMultiplicity_X_sub_C_self, hn, Nat.one_add]
state_before: case succ
R : Type u
S : Type v
T : Type w
a✝ b : R
n✝ : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
a : R
n : ℕ
hn : rootMultiplicity a ((X - ↑C a) ^ n) = n
hzero : (X - ↑C a) * (X - ↑C a) ^ n ≠ 0
⊢ rootMultiplicity a ((X - ↑C a) * (X - ↑C a) ^ n) = Nat.succ n

tactic: refine' rootMultiplicity_eq_zero _
state_before: case zero
R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
a : R
⊢ rootMultiplicity a ((X - ↑C a) ^ Nat.zero) = Nat.zero

tactic: simp only [eval_one, IsRoot.def, not_false_iff, one_ne_zero, pow_zero, Nat.zero_eq]
state_before: case zero
R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
a : R
⊢ ¬IsRoot ((X - ↑C a) ^ Nat.zero) a
Theorem: Int.fmod_eq_emod
File: Std/Data/Int/DivMod.lean

tactic: simp [fmod_def, emod_def, fdiv_eq_ediv _ hb]
state_before: a b : Int
hb : 0 ≤ b
⊢ fmod a b = a % b
Theorem: BoxIntegral.Box.nndist_le_distortion_mul
File: Mathlib/Analysis/BoxIntegral/Box/Basic.lean

tactic: apply mul_le_mul_right'
state_before: ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I : Box ι
i : ι
⊢ nndist I.lower I.upper / nndist (lower I i) (upper I i) * nndist (lower I i) (upper I i) ≤
    distortion I * nndist (lower I i) (upper I i)

tactic: apply Finset.le_sup (Finset.mem_univ i)
state_before: case bc
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I : Box ι
i : ι
⊢ nndist I.lower I.upper / nndist (lower I i) (upper I i) ≤ distortion I
Theorem: Nat.le_of_add_le_add_right
File: src/lean/Init/Data/Nat/Basic.lean

tactic: rw [Nat.add_comm _ b, Nat.add_comm _ b]
state_before: a b c : Nat
⊢ a + b ≤ c + b → a ≤ c

tactic: apply Nat.le_of_add_le_add_left
state_before: a b c : Nat
⊢ b + a ≤ b + c → a ≤ c
Theorem: FirstOrder.Language.Substructure.CG.map
File: Mathlib/ModelTheory/FinitelyGenerated.lean

tactic: rw [closure_image, ht.2]
state_before: L : Language
M : Type u_4
inst✝¹ : Structure L M
N : Type u_1
inst✝ : Structure L N
f : M →[L] N
s : Substructure L M
hs : CG s
t : Set M
ht : Set.Countable t ∧ LowerAdjoint.toFun (closure L) t = s
⊢ LowerAdjoint.toFun (closure L) (↑f '' t) = Substructure.map f s
Theorem: Set.strictMonoOn_iff_strictMono
File: Mathlib/Data/Set/Basic.lean

tactic: simp [StrictMono, StrictMonoOn]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α → β
⊢ StrictMonoOn f s ↔ StrictMono fun a => f ↑a
Theorem: Composition.ones_embedding
File: Mathlib/Combinatorics/Composition.lean

tactic: ext
state_before: n : ℕ
c : Composition n
i : Fin (length (ones n))
h : 0 < blocksFun (ones n) i
⊢ ↑(embedding (ones n) i) { val := 0, isLt := h } = { val := ↑i, isLt := (_ : ↑i < n) }

tactic: simpa using i.2.le
state_before: case h
n : ℕ
c : Composition n
i : Fin (length (ones n))
h : 0 < blocksFun (ones n) i
⊢ ↑(↑(embedding (ones n) i) { val := 0, isLt := h }) = ↑{ val := ↑i, isLt := (_ : ↑i < n) }
Theorem: SemiconjBy.units_inv_symm_left
File: Mathlib/Algebra/Group/Semiconj.lean

tactic: rw [Units.mul_inv_cancel_right]
state_before: M : Type u_1
inst✝ : Monoid M
a : Mˣ
x y : M
h : SemiconjBy (↑a) x y
⊢ ↑a⁻¹ * y = ↑a⁻¹ * (y * ↑a * ↑a⁻¹)

tactic: rw [← h.eq, ← mul_assoc, Units.inv_mul_cancel_left]
state_before: M : Type u_1
inst✝ : Monoid M
a : Mˣ
x y : M
h : SemiconjBy (↑a) x y
⊢ ↑a⁻¹ * (y * ↑a * ↑a⁻¹) = x * ↑a⁻¹
Theorem: Commute.list_sum_right
File: Mathlib/Data/List/BigOperators/Lemmas.lean

tactic: induction' l with x xs ih
state_before: ι : Type ?u.26
α : Type ?u.29
M : Type ?u.32
N : Type ?u.35
P : Type ?u.38
M₀ : Type ?u.41
G : Type ?u.44
R : Type u_1
inst✝ : NonUnitalNonAssocSemiring R
a : R
l : List R
h : ∀ (b : R), b ∈ l → Commute a b
⊢ Commute a (sum l)

tactic: exact Commute.zero_right _
state_before: case nil
ι : Type ?u.26
α : Type ?u.29
M : Type ?u.32
N : Type ?u.35
P : Type ?u.38
M₀ : Type ?u.41
G : Type ?u.44
R : Type u_1
inst✝ : NonUnitalNonAssocSemiring R
a : R
l : List R
h✝ : ∀ (b : R), b ∈ l → Commute a b
h : ∀ (b : R), b ∈ [] → Commute a b
⊢ Commute a (sum [])

tactic: rw [List.sum_cons]
state_before: case cons
ι : Type ?u.26
α : Type ?u.29
M : Type ?u.32
N : Type ?u.35
P : Type ?u.38
M₀ : Type ?u.41
G : Type ?u.44
R : Type u_1
inst✝ : NonUnitalNonAssocSemiring R
a : R
l : List R
h✝ : ∀ (b : R), b ∈ l → Commute a b
x : R
xs : List R
ih : (∀ (b : R), b ∈ xs → Commute a b) → Commute a (sum xs)
h : ∀ (b : R), b ∈ x :: xs → Commute a b
⊢ Commute a (sum (x :: xs))

tactic: exact (h _ <| mem_cons_self _ _).add_right (ih fun j hj => h _ <| mem_cons_of_mem _ hj)
state_before: case cons
ι : Type ?u.26
α : Type ?u.29
M : Type ?u.32
N : Type ?u.35
P : Type ?u.38
M₀ : Type ?u.41
G : Type ?u.44
R : Type u_1
inst✝ : NonUnitalNonAssocSemiring R
a : R
l : List R
h✝ : ∀ (b : R), b ∈ l → Commute a b
x : R
xs : List R
ih : (∀ (b : R), b ∈ xs → Commute a b) → Commute a (sum xs)
h : ∀ (b : R), b ∈ x :: xs → Commute a b
⊢ Commute a (x + sum xs)
Theorem: OrderIso.isLUB_image
File: Mathlib/Order/Bounds/OrderIso.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α ≃o β
s : Set α
x : β
h : IsLUB (↑f '' s) x
⊢ ∀ {x y : α}, ↑f x ≤ ↑f y ↔ x ≤ y

tactic: simp
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α ≃o β
s : Set α
x : β
h : IsLUB s (↑(symm f) x)
⊢ ∀ {x y : β}, ↑(symm f) x ≤ ↑(symm f) y ↔ x ≤ y
Theorem: mem_nhdsWithin_Iic_iff_exists_Ioc_subset'
File: Mathlib/Topology/Order/Basic.lean

tactic: norm_num
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : TopologicalSpace α
inst✝¹ : LinearOrder α
inst✝ : OrderTopology α
a l' : α
s : Set α
hl' : l' < a
⊢ List.get?
      [s ∈ 𝓝[Iic a] a, s ∈ 𝓝[Icc l' a] a, s ∈ 𝓝[Ioc l' a] a, ∃ l, l ∈ Ico l' a ∧ Ioc l a ⊆ s,
        ∃ l, l ∈ Iio a ∧ Ioc l a ⊆ s]
      0 =
    some (s ∈ 𝓝[Iic a] a)

tactic: norm_num
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : TopologicalSpace α
inst✝¹ : LinearOrder α
inst✝ : OrderTopology α
a l' : α
s : Set α
hl' : l' < a
⊢ List.get?
      [s ∈ 𝓝[Iic a] a, s ∈ 𝓝[Icc l' a] a, s ∈ 𝓝[Ioc l' a] a, ∃ l, l ∈ Ico l' a ∧ Ioc l a ⊆ s,
        ∃ l, l ∈ Iio a ∧ Ioc l a ⊆ s]
      4 =
    some (∃ l, l ∈ Iio a ∧ Ioc l a ⊆ s)
Theorem: finrank_eq_one_iff
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: constructor
state_before: K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
ι : Type u_1
inst✝ : Unique ι
⊢ finrank K V = 1 ↔ Nonempty (Basis ι K V)

tactic: intro h
state_before: case mp
K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
ι : Type u_1
inst✝ : Unique ι
⊢ finrank K V = 1 → Nonempty (Basis ι K V)

tactic: haveI := finiteDimensional_of_finrank (_root_.zero_lt_one.trans_le h.symm.le)
state_before: case mp
K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
ι : Type u_1
inst✝ : Unique ι
h : finrank K V = 1
⊢ Nonempty (Basis ι K V)

tactic: exact ⟨basisUnique ι h⟩
state_before: case mp
K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
ι : Type u_1
inst✝ : Unique ι
h : finrank K V = 1
this : FiniteDimensional K V
⊢ Nonempty (Basis ι K V)

tactic: rintro ⟨b⟩
state_before: case mpr
K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
ι : Type u_1
inst✝ : Unique ι
⊢ Nonempty (Basis ι K V) → finrank K V = 1

tactic: simpa using finrank_eq_card_basis b
state_before: case mpr.intro
K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
ι : Type u_1
inst✝ : Unique ι
b : Basis ι K V
⊢ finrank K V = 1
Theorem: CategoryTheory.MonoidalCategory.prodMonoidal_leftUnitor_hom_snd
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: cases X
state_before: C : Type u
𝒞 : Category C
inst✝⁴ : MonoidalCategory C
C₁ : Type u₁
inst✝³ : Category C₁
inst✝² : MonoidalCategory C₁
C₂ : Type u₂
inst✝¹ : Category C₂
inst✝ : MonoidalCategory C₂
X : C₁ × C₂
⊢ (λ_ X).hom.snd = (λ_ X.snd).hom

tactic: rfl
state_before: case mk
C : Type u
𝒞 : Category C
inst✝⁴ : MonoidalCategory C
C₁ : Type u₁
inst✝³ : Category C₁
inst✝² : MonoidalCategory C₁
C₂ : Type u₂
inst✝¹ : Category C₂
inst✝ : MonoidalCategory C₂
fst✝ : C₁
snd✝ : C₂
⊢ (λ_ (fst✝, snd✝)).hom.snd = (λ_ (fst✝, snd✝).snd).hom
Theorem: Complex.tan_neg
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [tan, neg_div]
state_before: x y : ℂ
⊢ tan (-x) = -tan x
Theorem: ContinuousLinearMap.projKerOfRightInverse_apply_idem
File: Mathlib/Topology/Algebra/Module/Basic.lean

tactic: ext1
state_before: R : Type u_2
inst✝¹⁵ : Ring R
R₂ : Type u_3
inst✝¹⁴ : Ring R₂
R₃ : Type ?u.921374
inst✝¹³ : Ring R₃
M : Type u_1
inst✝¹² : TopologicalSpace M
inst✝¹¹ : AddCommGroup M
M₂ : Type u_4
inst✝¹⁰ : TopologicalSpace M₂
inst✝⁹ : AddCommGroup M₂
M₃ : Type ?u.921398
inst✝⁸ : TopologicalSpace M₃
inst✝⁷ : AddCommGroup M₃
M₄ : Type ?u.921407
inst✝⁶ : TopologicalSpace M₄
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M
inst✝³ : Module R₂ M₂
inst✝² : Module R₃ M₃
σ₁₂ : R →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R →+* R₃
σ₂₁ : R₂ →+* R
inst✝¹ : RingHomInvPair σ₁₂ σ₂₁
inst✝ : TopologicalAddGroup M
f₁ : M →SL[σ₁₂] M₂
f₂ : M₂ →SL[σ₂₁] M
h : Function.RightInverse ↑f₂ ↑f₁
x : { x // x ∈ ker f₁ }
⊢ ↑(projKerOfRightInverse f₁ f₂ h) ↑x = x

tactic: simp
state_before: case a
R : Type u_2
inst✝¹⁵ : Ring R
R₂ : Type u_3
inst✝¹⁴ : Ring R₂
R₃ : Type ?u.921374
inst✝¹³ : Ring R₃
M : Type u_1
inst✝¹² : TopologicalSpace M
inst✝¹¹ : AddCommGroup M
M₂ : Type u_4
inst✝¹⁰ : TopologicalSpace M₂
inst✝⁹ : AddCommGroup M₂
M₃ : Type ?u.921398
inst✝⁸ : TopologicalSpace M₃
inst✝⁷ : AddCommGroup M₃
M₄ : Type ?u.921407
inst✝⁶ : TopologicalSpace M₄
inst✝⁵ : AddCommGroup M₄
inst✝⁴ : Module R M
inst✝³ : Module R₂ M₂
inst✝² : Module R₃ M₃
σ₁₂ : R →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R →+* R₃
σ₂₁ : R₂ →+* R
inst✝¹ : RingHomInvPair σ₁₂ σ₂₁
inst✝ : TopologicalAddGroup M
f₁ : M →SL[σ₁₂] M₂
f₂ : M₂ →SL[σ₂₁] M
h : Function.RightInverse ↑f₂ ↑f₁
x : { x // x ∈ ker f₁ }
⊢ ↑(↑(projKerOfRightInverse f₁ f₂ h) ↑x) = ↑x
Theorem: Real.Angle.tan_eq_inv_of_two_nsmul_add_two_nsmul_eq_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: induction θ using Real.Angle.induction_on
state_before: θ ψ : Angle
h : 2 • θ + 2 • ψ = ↑π
⊢ tan ψ = (tan θ)⁻¹

tactic: induction ψ using Real.Angle.induction_on
state_before: case h
ψ : Angle
x✝ : ℝ
h : 2 • ↑x✝ + 2 • ψ = ↑π
⊢ tan ψ = (tan ↑x✝)⁻¹

tactic: rw [← smul_add, ← coe_add, ← coe_nsmul, two_nsmul, ← two_mul, angle_eq_iff_two_pi_dvd_sub] at h
state_before: case h.h
x✝¹ x✝ : ℝ
h : 2 • ↑x✝¹ + 2 • ↑x✝ = ↑π
⊢ tan ↑x✝ = (tan ↑x✝¹)⁻¹

tactic: rcases h with ⟨k, h⟩
state_before: case h.h
x✝¹ x✝ : ℝ
h : ∃ k, 2 * (x✝¹ + x✝) - π = 2 * π * ↑k
⊢ tan ↑x✝ = (tan ↑x✝¹)⁻¹

tactic: rw [sub_eq_iff_eq_add, ← mul_inv_cancel_left₀ two_ne_zero π, mul_assoc, ← mul_add,
  mul_right_inj' (two_ne_zero' ℝ), ← eq_sub_iff_add_eq', mul_inv_cancel_left₀ two_ne_zero π,
  inv_mul_eq_div, mul_comm] at h
state_before: case h.h.intro
x✝¹ x✝ : ℝ
k : ℤ
h : 2 * (x✝¹ + x✝) - π = 2 * π * ↑k
⊢ tan ↑x✝ = (tan ↑x✝¹)⁻¹

tactic: rw [tan_coe, tan_coe, ← tan_pi_div_two_sub, h, add_sub_assoc, add_comm]
state_before: case h.h.intro
x✝¹ x✝ : ℝ
k : ℤ
h : x✝ = ↑k * π + π / 2 - x✝¹
⊢ tan ↑x✝ = (tan ↑x✝¹)⁻¹

tactic: exact Real.tan_periodic.int_mul _ _
state_before: case h.h.intro
x✝¹ x✝ : ℝ
k : ℤ
h : x✝ = ↑k * π + π / 2 - x✝¹
⊢ Real.tan (π / 2 - x✝¹ + ↑k * π) = Real.tan (π / 2 - x✝¹)
Theorem: Real.log_prod
File: Mathlib/Analysis/SpecialFunctions/Log/Basic.lean

tactic: induction' s using Finset.cons_induction_on with a s ha ih
state_before: x y : ℝ
α : Type u_1
s : Finset α
f : α → ℝ
hf : ∀ (x : α), x ∈ s → f x ≠ 0
⊢ log (∏ i in s, f i) = ∑ i in s, log (f i)

tactic: simp
state_before: case h₁
x y : ℝ
α : Type u_1
s : Finset α
f : α → ℝ
hf✝ : ∀ (x : α), x ∈ s → f x ≠ 0
hf : ∀ (x : α), x ∈ ∅ → f x ≠ 0
⊢ log (∏ i in ∅, f i) = ∑ i in ∅, log (f i)

tactic: rw [Finset.forall_mem_cons] at hf
state_before: case h₂
x y : ℝ
α : Type u_1
s✝ : Finset α
f : α → ℝ
hf✝ : ∀ (x : α), x ∈ s✝ → f x ≠ 0
a : α
s : Finset α
ha : ¬a ∈ s
ih : (∀ (x : α), x ∈ s → f x ≠ 0) → log (∏ i in s, f i) = ∑ i in s, log (f i)
hf : ∀ (x : α), x ∈ Finset.cons a s ha → f x ≠ 0
⊢ log (∏ i in Finset.cons a s ha, f i) = ∑ i in Finset.cons a s ha, log (f i)

tactic: simp [ih hf.2, log_mul hf.1 (Finset.prod_ne_zero_iff.2 hf.2)]
state_before: case h₂
x y : ℝ
α : Type u_1
s✝ : Finset α
f : α → ℝ
hf✝ : ∀ (x : α), x ∈ s✝ → f x ≠ 0
a : α
s : Finset α
ha : ¬a ∈ s
ih : (∀ (x : α), x ∈ s → f x ≠ 0) → log (∏ i in s, f i) = ∑ i in s, log (f i)
hf : f a ≠ 0 ∧ ∀ (x : α), x ∈ s → f x ≠ 0
⊢ log (∏ i in Finset.cons a s ha, f i) = ∑ i in Finset.cons a s ha, log (f i)
Theorem: isClosed_frontier
File: Mathlib/Topology/Basic.lean

tactic: rw [frontier_eq_closure_inter_closure]
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
⊢ IsClosed (frontier s)

tactic: exact IsClosed.inter isClosed_closure isClosed_closure
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
s : Set α
⊢ IsClosed (closure s ∩ closure (sᶜ))
Theorem: Polynomial.mem_support_derivative
File: Mathlib/Data/Polynomial/Derivative.lean

tactic: suffices ¬p.coeff (n + 1) * (n + 1 : ℕ) = 0 ↔ coeff p (n + 1) ≠ 0 by
  simpa only [mem_support_iff, coeff_derivative, Ne.def, Nat.cast_succ]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroSMulDivisors ℕ R
p : R[X]
n : ℕ
⊢ n ∈ support (↑derivative p) ↔ n + 1 ∈ support p

tactic: rw [← nsmul_eq_mul', smul_eq_zero]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroSMulDivisors ℕ R
p : R[X]
n : ℕ
⊢ ¬coeff p (n + 1) * ↑(n + 1) = 0 ↔ coeff p (n + 1) ≠ 0

tactic: simp only [Nat.succ_ne_zero, false_or_iff]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroSMulDivisors ℕ R
p : R[X]
n : ℕ
⊢ ¬(n + 1 = 0 ∨ coeff p (n + 1) = 0) ↔ coeff p (n + 1) ≠ 0

tactic: simpa only [mem_support_iff, coeff_derivative, Ne.def, Nat.cast_succ]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroSMulDivisors ℕ R
p : R[X]
n : ℕ
this : ¬coeff p (n + 1) * ↑(n + 1) = 0 ↔ coeff p (n + 1) ≠ 0
⊢ n ∈ support (↑derivative p) ↔ n + 1 ∈ support p
Theorem: isIntegral_iff_isIntegral_closure_finite
File: Mathlib/RingTheory/IntegralClosure.lean

tactic: constructor <;> intro hr
state_before: R : Type u_1
A : Type u_2
B : Type ?u.284040
S : Type ?u.284043
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : R →+* S
r : A
⊢ IsIntegral R r ↔ ∃ s, Set.Finite s ∧ IsIntegral { x // x ∈ Subring.closure s } r

tactic: rcases hr with ⟨s, _, hsr⟩
state_before: case mpr
R : Type u_1
A : Type u_2
B : Type ?u.284040
S : Type ?u.284043
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : R →+* S
r : A
hr : ∃ s, Set.Finite s ∧ IsIntegral { x // x ∈ Subring.closure s } r
⊢ IsIntegral R r

tactic: exact isIntegral_ofSubring _ hsr
state_before: case mpr.intro.intro
R : Type u_1
A : Type u_2
B : Type ?u.284040
S : Type ?u.284043
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : R →+* S
r : A
s : Set R
left✝ : Set.Finite s
hsr : IsIntegral { x // x ∈ Subring.closure s } r
⊢ IsIntegral R r

tactic: rcases hr with ⟨p, hmp, hpr⟩
state_before: case mp
R : Type u_1
A : Type u_2
B : Type ?u.284040
S : Type ?u.284043
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : R →+* S
r : A
hr : IsIntegral R r
⊢ ∃ s, Set.Finite s ∧ IsIntegral { x // x ∈ Subring.closure s } r

tactic: refine' ⟨_, Finset.finite_toSet _, p.restriction, monic_restriction.2 hmp, _⟩
state_before: case mp.intro.intro
R : Type u_1
A : Type u_2
B : Type ?u.284040
S : Type ?u.284043
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : R →+* S
r : A
p : R[X]
hmp : Monic p
hpr : eval₂ (algebraMap R A) r p = 0
⊢ ∃ s, Set.Finite s ∧ IsIntegral { x // x ∈ Subring.closure s } r

tactic: rw [← aeval_def, ← aeval_map_algebraMap R r p.restriction, map_restriction, aeval_def, hpr]
state_before: case mp.intro.intro
R : Type u_1
A : Type u_2
B : Type ?u.284040
S : Type ?u.284043
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : CommRing S
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : R →+* S
r : A
p : R[X]
hmp : Monic p
hpr : eval₂ (algebraMap R A) r p = 0
⊢ eval₂ (algebraMap { x // x ∈ Subring.closure ↑(frange p) } A) r (restriction p) = 0