tasksource/leandojo huggingface dataset:
Theorem: Polynomial.card_support_eq'
File: Mathlib/Data/Polynomial/EraseLead.lean

tactic: suffices (∑ i, C (x i) * X ^ k i).support = image k univ by
  rw [this, univ.card_image_of_injective hk, card_fin]
state_before: R : Type u_1
inst✝ : Semiring R
f : R[X]
n : ℕ
k : Fin n → ℕ
x : Fin n → R
hk : Function.Injective k
hx : ∀ (i : Fin n), x i ≠ 0
⊢ card (support (∑ i : Fin n, ↑C (x i) * X ^ k i)) = n

tactic: simp_rw [Finset.ext_iff, mem_support_iff, finset_sum_coeff, coeff_C_mul_X_pow, mem_image,
  mem_univ, true_and]
state_before: R : Type u_1
inst✝ : Semiring R
f : R[X]
n : ℕ
k : Fin n → ℕ
x : Fin n → R
hk : Function.Injective k
hx : ∀ (i : Fin n), x i ≠ 0
⊢ support (∑ i : Fin n, ↑C (x i) * X ^ k i) = image k univ

tactic: refine' fun i => ⟨fun h => _, _⟩
state_before: R : Type u_1
inst✝ : Semiring R
f : R[X]
n : ℕ
k : Fin n → ℕ
x : Fin n → R
hk : Function.Injective k
hx : ∀ (i : Fin n), x i ≠ 0
⊢ ∀ (a : ℕ), (∑ x_1 : Fin n, if a = k x_1 then x x_1 else 0) ≠ 0 ↔ ∃ a_1, k a_1 = a

tactic: rw [this, univ.card_image_of_injective hk, card_fin]
state_before: R : Type u_1
inst✝ : Semiring R
f : R[X]
n : ℕ
k : Fin n → ℕ
x : Fin n → R
hk : Function.Injective k
hx : ∀ (i : Fin n), x i ≠ 0
this : support (∑ i : Fin n, ↑C (x i) * X ^ k i) = image k univ
⊢ card (support (∑ i : Fin n, ↑C (x i) * X ^ k i)) = n

tactic: obtain ⟨j, _, h⟩ := exists_ne_zero_of_sum_ne_zero h
state_before: case refine'_1
R : Type u_1
inst✝ : Semiring R
f : R[X]
n : ℕ
k : Fin n → ℕ
x : Fin n → R
hk : Function.Injective k
hx : ∀ (i : Fin n), x i ≠ 0
i : ℕ
h : (∑ x_1 : Fin n, if i = k x_1 then x x_1 else 0) ≠ 0
⊢ ∃ a, k a = i

tactic: exact ⟨j, (ite_ne_right_iff.mp h).1.symm⟩
state_before: case refine'_1.intro.intro
R : Type u_1
inst✝ : Semiring R
f : R[X]
n : ℕ
k : Fin n → ℕ
x : Fin n → R
hk : Function.Injective k
hx : ∀ (i : Fin n), x i ≠ 0
i : ℕ
h✝ : (∑ x_1 : Fin n, if i = k x_1 then x x_1 else 0) ≠ 0
j : Fin n
left✝ : j ∈ univ
h : (if i = k j then x j else 0) ≠ 0
⊢ ∃ a, k a = i

tactic: rintro ⟨j, _, rfl⟩
state_before: case refine'_2
R : Type u_1
inst✝ : Semiring R
f : R[X]
n : ℕ
k : Fin n → ℕ
x : Fin n → R
hk : Function.Injective k
hx : ∀ (i : Fin n), x i ≠ 0
i : ℕ
⊢ (∃ a, k a = i) → (∑ x_1 : Fin n, if i = k x_1 then x x_1 else 0) ≠ 0

tactic: rw [sum_eq_single_of_mem j (mem_univ j), if_pos rfl]
state_before: case refine'_2.intro.refl
R : Type u_1
inst✝ : Semiring R
f : R[X]
n : ℕ
k : Fin n → ℕ
x : Fin n → R
hk : Function.Injective k
hx : ∀ (i : Fin n), x i ≠ 0
j : Fin n
⊢ (∑ x_1 : Fin n, if k j = k x_1 then x x_1 else 0) ≠ 0

tactic: exact hx j
state_before: case refine'_2.intro.refl
R : Type u_1
inst✝ : Semiring R
f : R[X]
n : ℕ
k : Fin n → ℕ
x : Fin n → R
hk : Function.Injective k
hx : ∀ (i : Fin n), x i ≠ 0
j : Fin n
⊢ x j ≠ 0

tactic: exact fun m _ hmj => if_neg fun h => hmj.symm (hk h)
state_before: case refine'_2.intro.refl
R : Type u_1
inst✝ : Semiring R
f : R[X]
n : ℕ
k : Fin n → ℕ
x : Fin n → R
hk : Function.Injective k
hx : ∀ (i : Fin n), x i ≠ 0
j : Fin n
⊢ ∀ (b : Fin n), b ∈ univ → b ≠ j → (if k j = k b then x b else 0) = 0
Theorem: isOpen_set_pi
File: Mathlib/Topology/Constructions.lean

tactic: rw [pi_def]
state_before: α : Type u
β : Type v
γ : Type ?u.220683
δ : Type ?u.220686
ε : Type ?u.220689
ζ : Type ?u.220692
ι : Type u_1
π : ι → Type u_2
κ : Type ?u.220703
inst✝¹ : TopologicalSpace α
inst✝ : (i : ι) → TopologicalSpace (π i)
f : α → (i : ι) → π i
i : Set ι
s : (a : ι) → Set (π a)
hi : Set.Finite i
hs : ∀ (a : ι), a ∈ i → IsOpen (s a)
⊢ IsOpen (Set.pi i s)

tactic: exact isOpen_biInter hi fun a ha => (hs _ ha).preimage (continuous_apply _)
state_before: α : Type u
β : Type v
γ : Type ?u.220683
δ : Type ?u.220686
ε : Type ?u.220689
ζ : Type ?u.220692
ι : Type u_1
π : ι → Type u_2
κ : Type ?u.220703
inst✝¹ : TopologicalSpace α
inst✝ : (i : ι) → TopologicalSpace (π i)
f : α → (i : ι) → π i
i : Set ι
s : (a : ι) → Set (π a)
hi : Set.Finite i
hs : ∀ (a : ι), a ∈ i → IsOpen (s a)
⊢ IsOpen (⋂ (a : ι) (_ : a ∈ i), eval a ⁻¹' s a)
Theorem: Complex.sin_ofReal_im
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← ofReal_sin_ofReal_re, ofReal_im]
state_before: x✝ y : ℂ
x : ℝ
⊢ (sin ↑x).im = 0
Theorem: Int.div2_bit
File: Mathlib/Data/Int/Lemmas.lean

tactic: rw [bit_val, div2_val, add_comm, Int.add_mul_ediv_left, (_ : (_ / 2 : ℤ) = 0), zero_add]
state_before: a b✝ : ℤ
n✝ : ℕ
b : Bool
n : ℤ
⊢ div2 (bit b n) = n

tactic: cases b
state_before: a b✝ : ℤ
n✝ : ℕ
b : Bool
n : ℤ
⊢ (bif b then 1 else 0) / 2 = 0

case H
a b✝ : ℤ
n✝ : ℕ
b : Bool
n : ℤ
⊢ 2 ≠ 0

tactic: simp
state_before: case false
a b : ℤ
n✝ : ℕ
n : ℤ
⊢ (bif false then 1 else 0) / 2 = 0

tactic: show ofNat _ = _
state_before: case true
a b : ℤ
n✝ : ℕ
n : ℤ
⊢ (bif true then 1 else 0) / 2 = 0

tactic: rw [Nat.div_eq_zero] <;> simp
state_before: case true
a b : ℤ
n✝ : ℕ
n : ℤ
⊢ ofNat (1 / 2) = 0

tactic: decide
state_before: case H
a b✝ : ℤ
n✝ : ℕ
b : Bool
n : ℤ
⊢ 2 ≠ 0
Theorem: Matrix.IsHermitian.adjugate
File: Mathlib/LinearAlgebra/Matrix/Hermitian.lean

tactic: simp [IsHermitian, adjugate_conjTranspose, hA.eq]
state_before: α : Type u_2
β : Type ?u.50563
m : Type u_1
n : Type ?u.50569
A✝ : Matrix n n α
inst✝³ : CommRing α
inst✝² : StarRing α
inst✝¹ : Fintype m
inst✝ : DecidableEq m
A : Matrix m m α
hA : IsHermitian A
⊢ IsHermitian (Matrix.adjugate A)
Theorem: TypeVec.prod_map_id
File: Mathlib/Data/TypeVec.lean

tactic: ext i x : 2
state_before: n : ℕ
α β : TypeVec n
⊢ (id ⊗' id) = id

tactic: induction i <;> simp only [TypeVec.prod.map, *, dropFun_id]
state_before: case a.h
n : ℕ
α β : TypeVec n
i : Fin2 n
x : (α ⊗ β) i
⊢ (id ⊗' id) i x = id i x

tactic: cases x
state_before: case a.h.fz
n n✝ : ℕ
α β : TypeVec (Nat.succ n✝)
x : (α ⊗ β) Fin2.fz
⊢ (id Fin2.fz x.fst, id Fin2.fz x.snd) = id Fin2.fz x

case a.h.fs
n n✝ : ℕ
a✝ : Fin2 n✝
a_ih✝ : ∀ {α β : TypeVec n✝} (x : (α ⊗ β) a✝), (id ⊗' id) a✝ x = id a✝ x
α β : TypeVec (Nat.succ n✝)
x : (α ⊗ β) (Fin2.fs a✝)
⊢ id a✝ x = id (Fin2.fs a✝) x

tactic: rfl
state_before: case a.h.fz.mk
n n✝ : ℕ
α β : TypeVec (Nat.succ n✝)
fst✝ : last α
snd✝ : last β
⊢ (id Fin2.fz (fst✝, snd✝).fst, id Fin2.fz (fst✝, snd✝).snd) = id Fin2.fz (fst✝, snd✝)

case a.h.fs
n n✝ : ℕ
a✝ : Fin2 n✝
a_ih✝ : ∀ {α β : TypeVec n✝} (x : (α ⊗ β) a✝), (id ⊗' id) a✝ x = id a✝ x
α β : TypeVec (Nat.succ n✝)
x : (α ⊗ β) (Fin2.fs a✝)
⊢ id a✝ x = id (Fin2.fs a✝) x

tactic: rfl
state_before: case a.h.fs
n n✝ : ℕ
a✝ : Fin2 n✝
a_ih✝ : ∀ {α β : TypeVec n✝} (x : (α ⊗ β) a✝), (id ⊗' id) a✝ x = id a✝ x
α β : TypeVec (Nat.succ n✝)
x : (α ⊗ β) (Fin2.fs a✝)
⊢ id a✝ x = id (Fin2.fs a✝) x
Theorem: Filter.pi_inf_principal_univ_pi_eq_bot
File: Mathlib/Order/Filter/Pi.lean

tactic: constructor
state_before: ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ pi f ⊓ 𝓟 (Set.pi univ s) = ⊥ ↔ ∃ i, f i ⊓ 𝓟 (s i) = ⊥

tactic: simp only [inf_principal_eq_bot, mem_pi]
state_before: case mp
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ pi f ⊓ 𝓟 (Set.pi univ s) = ⊥ → ∃ i, f i ⊓ 𝓟 (s i) = ⊥

tactic: contrapose!
state_before: case mp
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ (∃ I, Set.Finite I ∧ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ Set.pi I t ⊆ Set.pi univ sᶜ) → ∃ i, s iᶜ ∈ f i

tactic: rintro (hsf : ∀ i, ∃ᶠ x in f i, x ∈ s i) I - t htf hts
state_before: case mp
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ (∀ (i : ι), ¬s iᶜ ∈ f i) →
    ∀ (I : Set ι), Set.Finite I → ∀ (t : (i : ι) → Set (α i)), (∀ (i : ι), t i ∈ f i) → ¬Set.pi I t ⊆ Set.pi univ sᶜ

tactic: have : ∀ i, (s i ∩ t i).Nonempty := fun i => ((hsf i).and_eventually (htf i)).exists
state_before: case mp
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
hsf : ∀ (i : ι), ∃ᶠ (x : α i) in f i, x ∈ s i
I : Set ι
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hts : Set.pi I t ⊆ Set.pi univ sᶜ
⊢ False

tactic: choose x hxs hxt using this
state_before: case mp
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
hsf : ∀ (i : ι), ∃ᶠ (x : α i) in f i, x ∈ s i
I : Set ι
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hts : Set.pi I t ⊆ Set.pi univ sᶜ
this : ∀ (i : ι), Set.Nonempty (s i ∩ t i)
⊢ False

tactic: exact hts (fun i _ => hxt i) (mem_univ_pi.2 hxs)
state_before: case mp
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
hsf : ∀ (i : ι), ∃ᶠ (x : α i) in f i, x ∈ s i
I : Set ι
t : (i : ι) → Set (α i)
htf : ∀ (i : ι), t i ∈ f i
hts : Set.pi I t ⊆ Set.pi univ sᶜ
x : (i : ι) → α i
hxs : ∀ (i : ι), x i ∈ s i
hxt : ∀ (i : ι), x i ∈ t i
⊢ False

tactic: simp only [inf_principal_eq_bot]
state_before: case mpr
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ (∃ i, f i ⊓ 𝓟 (s i) = ⊥) → pi f ⊓ 𝓟 (Set.pi univ s) = ⊥

tactic: rintro ⟨i, hi⟩
state_before: case mpr
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
⊢ (∃ i, s iᶜ ∈ f i) → Set.pi univ sᶜ ∈ pi f

tactic: filter_upwards [mem_pi_of_mem i hi]with x using mt fun h => h i trivial
state_before: case mpr.intro
ι : Type u_1
α : ι → Type u_2
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
i : ι
hi : s iᶜ ∈ f i
⊢ Set.pi univ sᶜ ∈ pi f
Theorem: Module.Baer.ExtensionOf.ext_iff
File: Mathlib/Algebra/Module/Injective.lean

tactic: exact_mod_cast h
state_before: R : Type u
inst✝⁶ : Ring R
Q : TypeMax
inst✝⁵ : AddCommGroup Q
inst✝⁴ : Module R Q
M N : Type (max u v)
inst✝³ : AddCommGroup M
inst✝² : AddCommGroup N
inst✝¹ : Module R M
inst✝ : Module R N
i : M →ₗ[R] N
f : M →ₗ[R] Q
a b : ExtensionOf i f
r : a = b
x y : { x // x ∈ a.domain }
h : ↑x = ↑y
⊢ x = y
Theorem: Ordinal.out_no_max_of_succ_lt
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rwa [type_lt]
state_before: α : Type ?u.103999
β : Type ?u.104002
γ : Type ?u.104005
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
ho : ∀ (a : Ordinal), a < o → succ a < o
⊢ ∀ (a : Ordinal), (a < type fun a b => a < b) → succ a < type fun a b => a < b
Theorem: Int.int_cast_ofNat
File: Mathlib/Data/Int/Cast/Basic.lean

tactic: simpa only [OfNat.ofNat] using AddGroupWithOne.intCast_ofNat (R := R) n
state_before: R : Type u
inst✝¹ : AddGroupWithOne R
n : ℕ
inst✝ : AtLeastTwo n
⊢ ↑(OfNat.ofNat n) = OfNat.ofNat n
Theorem: Multiset.Ico_filter_le_of_right_le
File: Mathlib/Data/Multiset/LocallyFinite.lean

tactic: rw [Ico, ← Finset.filter_val, Finset.Ico_filter_le_of_right_le]
state_before: α : Type u_1
inst✝² : Preorder α
inst✝¹ : LocallyFiniteOrder α
a b c : α
inst✝ : DecidablePred ((fun x x_1 => x ≤ x_1) b)
⊢ filter (fun x => b ≤ x) (Ico a b) = ∅

tactic: rfl
state_before: α : Type u_1
inst✝² : Preorder α
inst✝¹ : LocallyFiniteOrder α
a b c : α
inst✝ : DecidablePred ((fun x x_1 => x ≤ x_1) b)
⊢ ∅.val = ∅
Theorem: Real.Angle.sin_antiperiodic
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: intro θ
state_before: ⊢ Function.Antiperiodic sin ↑π

tactic: induction θ using Real.Angle.induction_on
state_before: θ : Angle
⊢ sin (θ + ↑π) = -sin θ

tactic: exact Real.sin_antiperiodic _
state_before: case h
x✝ : ℝ
⊢ sin (↑x✝ + ↑π) = -sin ↑x✝
Theorem: BddAbove.image2_bddBelow
File: Mathlib/Order/Bounds/Basic.lean

tactic: rintro ⟨a, ha⟩ ⟨b, hb⟩
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β → γ
s : Set α
t : Set β
a : α
b : β
h₀ : ∀ (b : β), Antitone (swap f b)
h₁ : ∀ (a : α), Antitone (f a)
⊢ BddAbove s → BddAbove t → BddBelow (Set.image2 f s t)

tactic: exact ⟨f a b, mem_lowerBounds_image2_of_mem_upperBounds h₀ h₁ ha hb⟩
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β → γ
s : Set α
t : Set β
a✝ : α
b✝ : β
h₀ : ∀ (b : β), Antitone (swap f b)
h₁ : ∀ (a : α), Antitone (f a)
a : α
ha : a ∈ upperBounds s
b : β
hb : b ∈ upperBounds t
⊢ BddBelow (Set.image2 f s t)
Theorem: MeasureTheory.SignedMeasure.jordanDecomposition_add_withDensity_mutuallySingular
File: Mathlib/MeasureTheory/Decomposition/Lebesgue.lean

tactic: rw [mutuallySingular_ennreal_iff, totalVariation_mutuallySingular_iff] at htμ
state_before: α : Type u_1
β : Type ?u.449524
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
f : α → ℝ
hf : Measurable f
htμ : t ⟂ᵥ toENNRealVectorMeasure μ
⊢ ((toJordanDecomposition t).posPart + withDensity μ fun x => ENNReal.ofReal (f x)) ⟂ₘ
    (toJordanDecomposition t).negPart + withDensity μ fun x => ENNReal.ofReal (-f x)

tactic: change
  _ ⟂ₘ VectorMeasure.equivMeasure.toFun (VectorMeasure.equivMeasure.invFun μ) ∧
    _ ⟂ₘ VectorMeasure.equivMeasure.toFun (VectorMeasure.equivMeasure.invFun μ) at htμ
state_before: α : Type u_1
β : Type ?u.449524
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
f : α → ℝ
hf : Measurable f
htμ :
  (toJordanDecomposition t).posPart ⟂ₘ VectorMeasure.ennrealToMeasure (toENNRealVectorMeasure μ) ∧
    (toJordanDecomposition t).negPart ⟂ₘ VectorMeasure.ennrealToMeasure (toENNRealVectorMeasure μ)
⊢ ((toJordanDecomposition t).posPart + withDensity μ fun x => ENNReal.ofReal (f x)) ⟂ₘ
    (toJordanDecomposition t).negPart + withDensity μ fun x => ENNReal.ofReal (-f x)

tactic: rw [VectorMeasure.equivMeasure.right_inv] at htμ
state_before: α : Type u_1
β : Type ?u.449524
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
f : α → ℝ
hf : Measurable f
htμ :
  (toJordanDecomposition t).posPart ⟂ₘ
      Equiv.toFun VectorMeasure.equivMeasure (Equiv.invFun VectorMeasure.equivMeasure μ) ∧
    (toJordanDecomposition t).negPart ⟂ₘ
      Equiv.toFun VectorMeasure.equivMeasure (Equiv.invFun VectorMeasure.equivMeasure μ)
⊢ ((toJordanDecomposition t).posPart + withDensity μ fun x => ENNReal.ofReal (f x)) ⟂ₘ
    (toJordanDecomposition t).negPart + withDensity μ fun x => ENNReal.ofReal (-f x)

tactic: exact
  ((JordanDecomposition.mutuallySingular _).add_right
        (htμ.1.mono_ac (refl _) (withDensity_absolutelyContinuous _ _))).add_left
    ((htμ.2.symm.mono_ac (withDensity_absolutelyContinuous _ _) (refl _)).add_right
      (withDensity_ofReal_mutuallySingular hf))
state_before: α : Type u_1
β : Type ?u.449524
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
f : α → ℝ
hf : Measurable f
htμ : (toJordanDecomposition t).posPart ⟂ₘ μ ∧ (toJordanDecomposition t).negPart ⟂ₘ μ
⊢ ((toJordanDecomposition t).posPart + withDensity μ fun x => ENNReal.ofReal (f x)) ⟂ₘ
    (toJordanDecomposition t).negPart + withDensity μ fun x => ENNReal.ofReal (-f x)
Theorem: Finset.image_image₂_distrib
File: Mathlib/Data/Finset/NAry.lean

tactic: push_cast
state_before: α : Type u_3
α' : Type u_5
β : Type u_4
β' : Type u_6
γ : Type u_2
γ' : Type ?u.79278
δ : Type u_1
δ' : Type ?u.79284
ε : Type ?u.79287
ε' : Type ?u.79290
ζ : Type ?u.79293
ζ' : Type ?u.79296
ν : Type ?u.79299
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f f'✝ : α → β → γ
g✝ g' : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
g : γ → δ
f' : α' → β' → δ
g₁ : α → α'
g₂ : β → β'
h_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ a) (g₂ b)
⊢ ↑(image g (image₂ f s t)) = ↑(image₂ f' (image g₁ s) (image g₂ t))

tactic: exact image_image2_distrib h_distrib
state_before: α : Type u_3
α' : Type u_5
β : Type u_4
β' : Type u_6
γ : Type u_2
γ' : Type ?u.79278
δ : Type u_1
δ' : Type ?u.79284
ε : Type ?u.79287
ε' : Type ?u.79290
ζ : Type ?u.79293
ζ' : Type ?u.79296
ν : Type ?u.79299
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f f'✝ : α → β → γ
g✝ g' : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
g : γ → δ
f' : α' → β' → δ
g₁ : α → α'
g₂ : β → β'
h_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ a) (g₂ b)
⊢ g '' image2 f ↑s ↑t = image2 f' (g₁ '' ↑s) (g₂ '' ↑t)
Theorem: Computable.option_casesOn
File: Mathlib/Computability/Partrec.lean

tactic: cases o a <;> simp [encodek]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.183096
σ : Type u_3
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
o : α → Option β
f : α → σ
g : α → β → σ
ho : Computable o
hf : Computable f
hg : Computable₂ g
a : α
⊢ (Nat.casesOn (encode (o a)) (Option.some (f a)) fun n => Option.map (g a) (decode n)) =
    Option.some (Option.casesOn (o a) (f a) (g a))
Theorem: Array.size_toArray
File: Std/Data/Array/Init/Lemmas.lean

tactic: simp [size]
state_before: α : Type u_1
as : List α
⊢ size (List.toArray as) = List.length as
Theorem: Nat.descFactorial_lt_pow
File: Mathlib/Data/Nat/Factorial/Basic.lean

tactic: rintro ⟨⟩
state_before: n : ℕ
hn : 1 ≤ n
⊢ 2 ≤ 0 → descFactorial n 0 < n ^ 0

tactic: intro
state_before: n : ℕ
hn : 1 ≤ n
⊢ 2 ≤ 1 → descFactorial n 1 < n ^ 1

tactic: contradiction
state_before: n : ℕ
hn : 1 ≤ n
a✝ : 2 ≤ 1
⊢ descFactorial n 1 < n ^ 1

tactic: rw [descFactorial_succ, pow_succ', mul_comm, mul_comm n]
state_before: n : ℕ
hn : 1 ≤ n
k : ℕ
x✝ : 2 ≤ k + 2
⊢ descFactorial n (k + 2) < n ^ (k + 2)

tactic: exact Nat.mul_lt_mul' (descFactorial_le_pow _ _) (tsub_lt_self hn k.zero_lt_succ)
  (pow_pos (Nat.lt_of_succ_le hn) _)
state_before: n : ℕ
hn : 1 ≤ n
k : ℕ
x✝ : 2 ≤ k + 2
⊢ descFactorial n (k + 1) * (n - (k + 1)) < n ^ (k + 1) * n
Theorem: Set.bounded_lt_Iic
File: Mathlib/Order/Bounded.lean

tactic: simp only [← bounded_le_iff_bounded_lt, bounded_le_Iic]
state_before: α : Type u_1
r : α → α → Prop
s t : Set α
inst✝¹ : Preorder α
inst✝ : NoMaxOrder α
a : α
⊢ Bounded (fun x x_1 => x < x_1) (Iic a)
Theorem: PerfectClosure.nat_cast_eq_iff
File: Mathlib/FieldTheory/PerfectClosure.lean

tactic: constructor <;> intro H
state_before: K : Type u
inst✝² : CommRing K
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP K p
x y : ℕ
⊢ ↑x = ↑y ↔ ↑x = ↑y

tactic: rw [nat_cast K p 0, nat_cast K p 0, H]
state_before: case mpr
K : Type u
inst✝² : CommRing K
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP K p
x y : ℕ
H : ↑x = ↑y
⊢ ↑x = ↑y

tactic: rw [nat_cast K p 0, nat_cast K p 0, eq_iff'] at H
state_before: case mp
K : Type u
inst✝² : CommRing K
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP K p
x y : ℕ
H : ↑x = ↑y
⊢ ↑x = ↑y

tactic: cases' H with z H
state_before: case mp
K : Type u
inst✝² : CommRing K
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP K p
x y : ℕ
H : ∃ z, (↑(frobenius K p)^[(0, ↑y).fst + z]) (0, ↑x).snd = (↑(frobenius K p)^[(0, ↑x).fst + z]) (0, ↑y).snd
⊢ ↑x = ↑y

tactic: simpa only [zero_add, iterate_fixed (frobenius_nat_cast K p _)] using H
state_before: case mp.intro
K : Type u
inst✝² : CommRing K
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP K p
x y z : ℕ
H : (↑(frobenius K p)^[(0, ↑y).fst + z]) (0, ↑x).snd = (↑(frobenius K p)^[(0, ↑x).fst + z]) (0, ↑y).snd
⊢ ↑x = ↑y
Theorem: Polynomial.monic_scaleRoots_iff
File: Mathlib/RingTheory/Polynomial/ScaleRoots.lean

tactic: simp only [Monic, leadingCoeff, natDegree_scaleRoots, coeff_scaleRoots_natDegree]
state_before: A : Type ?u.36545
K : Type ?u.36548
R : Type u_1
S : Type ?u.36554
inst✝⁴ : CommRing A
inst✝³ : IsDomain A
inst✝² : Field K
inst✝¹ : CommRing R
inst✝ : CommRing S
M : Submonoid A
p : R[X]
s : R
⊢ Monic (scaleRoots p s) ↔ Monic p
Theorem: Homeomorph.isClosed_preimage
File: Mathlib/Topology/Homeomorph.lean

tactic: simp only [← isOpen_compl_iff, ← preimage_compl, isOpen_preimage]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.64146
δ : Type ?u.64149
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
h : α ≃ₜ β
s : Set β
⊢ IsClosed (↑h ⁻¹' s) ↔ IsClosed s
Theorem: Finsupp.sum_sum_index'
File: Mathlib/Algebra/BigOperators/Finsupp.lean

tactic: simp_rw [Finset.sum_insert has, Finsupp.sum_add_index' h0 h1, ih]
state_before: α : Type u_4
ι : Type u_2
γ : Type ?u.618499
A : Type u_3
B : Type ?u.618505
C : Type u_1
inst✝² : AddCommMonoid A
inst✝¹ : AddCommMonoid B
inst✝ : AddCommMonoid C
t : ι → A → C
h0 : ∀ (i : ι), t i 0 = 0
h1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y
s✝ : Finset α
f : α → ι →₀ A
i : ι
g : ι →₀ A
k : ι → A → γ → B
x : γ
β : Type ?u.621638
M : Type ?u.621641
M' : Type ?u.621644
N : Type ?u.621647
P : Type ?u.621650
G : Type ?u.621653
H : Type ?u.621656
R : Type ?u.621659
S : Type ?u.621662
a : α
s : Finset α
has : ¬a ∈ s
ih : sum (∑ x in s, f x) t = ∑ x in s, sum (f x) t
⊢ sum (∑ x in insert a s, f x) t = ∑ x in insert a s, sum (f x) t
Theorem: List.toFinset_eq_empty_iff
File: Mathlib/Data/Finset/Basic.lean

tactic: cases l <;> simp
state_before: α : Type u_1
β : Type ?u.478682
γ : Type ?u.478685
inst✝ : DecidableEq α
l✝ l' : List α
a : α
l : List α
⊢ toFinset l = ∅ ↔ l = []
Theorem: Polynomial.not_dvd_of_degree_lt
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: by_contra hcontra
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p✝ q✝ p q : R[X]
h0 : q ≠ 0
hl : degree q < degree p
⊢ ¬p ∣ q

tactic: exact h0 (eq_zero_of_dvd_of_degree_lt hcontra hl)
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p✝ q✝ p q : R[X]
h0 : q ≠ 0
hl : degree q < degree p
hcontra : p ∣ q
⊢ False
Theorem: Polynomial.X_pow_mul_monomial
File: Mathlib/Data/Polynomial/Basic.lean

tactic: rw [X_pow_mul, monomial_mul_X_pow]
state_before: R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
k n : ℕ
r : R
⊢ X ^ k * ↑(monomial n) r = ↑(monomial (n + k)) r
Theorem: joinedIn_iff_joined
File: Mathlib/Topology/PathConnected.lean

tactic: simp
state_before: X : Type u_1
Y : Type ?u.609371
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type ?u.609386
F : Set X
x_in : x ∈ F
y_in : y ∈ F
h : Joined { val := x, property := x_in } { val := y, property := y_in }
⊢ ∀ (t : ↑I), ↑(Path.map (Joined.somePath h) (_ : Continuous Subtype.val)) t ∈ F
Theorem: Int.ModEq.add_right_cancel
File: Mathlib/Data/Int/ModEq.lean

tactic: rw [add_comm a, add_comm b] at h₂
state_before: m n a b c d : ℤ
h₁ : c ≡ d [ZMOD n]
h₂ : a + c ≡ b + d [ZMOD n]
⊢ a ≡ b [ZMOD n]

tactic: exact h₁.add_left_cancel h₂
state_before: m n a b c d : ℤ
h₁ : c ≡ d [ZMOD n]
h₂ : c + a ≡ d + b [ZMOD n]
⊢ a ≡ b [ZMOD n]
Theorem: IsPrimitiveRoot.map_of_injective
File: Mathlib/RingTheory/RootsOfUnity/Basic.lean

tactic: rw [← map_pow, h.pow_eq_one, _root_.map_one]
state_before: M : Type u_2
N : Type u_3
G : Type ?u.2380264
R : Type ?u.2380267
S : Type ?u.2380270
F : Type u_1
inst✝³ : CommMonoid M
inst✝² : CommMonoid N
inst✝¹ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
inst✝ : MonoidHomClass F M N
h : IsPrimitiveRoot ζ k
hf : Injective ↑f
⊢ ↑f ζ ^ k = 1

tactic: rw [h.eq_orderOf]
state_before: M : Type u_2
N : Type u_3
G : Type ?u.2380264
R : Type ?u.2380267
S : Type ?u.2380270
F : Type u_1
inst✝³ : CommMonoid M
inst✝² : CommMonoid N
inst✝¹ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
inst✝ : MonoidHomClass F M N
h : IsPrimitiveRoot ζ k
hf : Injective ↑f
⊢ ∀ (l : ℕ), ↑f ζ ^ l = 1 → k ∣ l

tactic: intro l hl
state_before: M : Type u_2
N : Type u_3
G : Type ?u.2380264
R : Type ?u.2380267
S : Type ?u.2380270
F : Type u_1
inst✝³ : CommMonoid M
inst✝² : CommMonoid N
inst✝¹ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
inst✝ : MonoidHomClass F M N
h : IsPrimitiveRoot ζ k
hf : Injective ↑f
⊢ ∀ (l : ℕ), ↑f ζ ^ l = 1 → orderOf ζ ∣ l

tactic: rw [← map_pow, ← map_one f] at hl
state_before: M : Type u_2
N : Type u_3
G : Type ?u.2380264
R : Type ?u.2380267
S : Type ?u.2380270
F : Type u_1
inst✝³ : CommMonoid M
inst✝² : CommMonoid N
inst✝¹ : DivisionCommMonoid G
k l✝ : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
inst✝ : MonoidHomClass F M N
h : IsPrimitiveRoot ζ k
hf : Injective ↑f
l : ℕ
hl : ↑f ζ ^ l = 1
⊢ orderOf ζ ∣ l

tactic: exact orderOf_dvd_of_pow_eq_one (hf hl)
state_before: M : Type u_2
N : Type u_3
G : Type ?u.2380264
R : Type ?u.2380267
S : Type ?u.2380270
F : Type u_1
inst✝³ : CommMonoid M
inst✝² : CommMonoid N
inst✝¹ : DivisionCommMonoid G
k l✝ : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
inst✝ : MonoidHomClass F M N
h : IsPrimitiveRoot ζ k
hf : Injective ↑f
l : ℕ
hl : ↑f (ζ ^ l) = ↑f 1
⊢ orderOf ζ ∣ l