1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: hammingDist_self
File: Mathlib/InformationTheory/Hamming.lean

tactic: rw [hammingDist, card_eq_zero, filter_eq_empty_iff]
state_before: α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝² : Fintype ι
inst✝¹ : (i : ι) → DecidableEq (β i)
γ : ι → Type u_4
inst✝ : (i : ι) → DecidableEq (γ i)
x : (i : ι) → β i
⊢ hammingDist x x = 0
state_after: α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝² : Fintype ι
inst✝¹ : (i : ι) → DecidableEq (β i)
γ : ι → Type u_4
inst✝ : (i : ι) → DecidableEq (γ i)
x : (i : ι) → β i
⊢ ∀ ⦃x_1 : ι⦄, x_1 ∈ univ → ¬x x_1 ≠ x x_1

tactic: exact fun _ _ H => H rfl
state_before: α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝² : Fintype ι
inst✝¹ : (i : ι) → DecidableEq (β i)
γ : ι → Type u_4
inst✝ : (i : ι) → DecidableEq (γ i)
x : (i : ι) → β i
⊢ ∀ ⦃x_1 : ι⦄, x_1 ∈ univ → ¬x x_1 ≠ x x_1
state_after: no goals
Theorem: SeminormFamily.basisSets_nonempty
File: Mathlib/Analysis/LocallyConvex/WithSeminorms.lean

tactic: let i := Classical.arbitrary ι
state_before: 𝕜 : Type u_1
𝕜₂ : Type u_2
𝕝 : Type u_3
𝕝₂ : Type u_4
E : Type u_5
F : Type u_6
G : Type u_7
ι : Type u_8
ι' : Type u_9
inst✝³ : NormedField 𝕜
inst✝² : AddCommGroup E
inst✝¹ : Module 𝕜 E
p : SeminormFamily 𝕜 E ι
inst✝ : Nonempty ι
⊢ p.basisSets.Nonempty
state_after: 𝕜 : Type u_1
𝕜₂ : Type u_2
𝕝 : Type u_3
𝕝₂ : Type u_4
E : Type u_5
F : Type u_6
G : Type u_7
ι : Type u_8
ι' : Type u_9
inst✝³ : NormedField 𝕜
inst✝² : AddCommGroup E
inst✝¹ : Module 𝕜 E
p : SeminormFamily 𝕜 E ι
inst✝ : Nonempty ι
i : ι := Classical.arbitrary ι
⊢ p.basisSets.Nonempty

tactic: refine nonempty_def.mpr ⟨(p i).ball 0 1, ?_⟩
state_before: 𝕜 : Type u_1
𝕜₂ : Type u_2
𝕝 : Type u_3
𝕝₂ : Type u_4
E : Type u_5
F : Type u_6
G : Type u_7
ι : Type u_8
ι' : Type u_9
inst✝³ : NormedField 𝕜
inst✝² : AddCommGroup E
inst✝¹ : Module 𝕜 E
p : SeminormFamily 𝕜 E ι
inst✝ : Nonempty ι
i : ι := Classical.arbitrary ι
⊢ p.basisSets.Nonempty
state_after: 𝕜 : Type u_1
𝕜₂ : Type u_2
𝕝 : Type u_3
𝕝₂ : Type u_4
E : Type u_5
F : Type u_6
G : Type u_7
ι : Type u_8
ι' : Type u_9
inst✝³ : NormedField 𝕜
inst✝² : AddCommGroup E
inst✝¹ : Module 𝕜 E
p : SeminormFamily 𝕜 E ι
inst✝ : Nonempty ι
i : ι := Classical.arbitrary ι
⊢ (p i).ball 0 1 ∈ p.basisSets

tactic: exact p.basisSets_singleton_mem i zero_lt_one
state_before: 𝕜 : Type u_1
𝕜₂ : Type u_2
𝕝 : Type u_3
𝕝₂ : Type u_4
E : Type u_5
F : Type u_6
G : Type u_7
ι : Type u_8
ι' : Type u_9
inst✝³ : NormedField 𝕜
inst✝² : AddCommGroup E
inst✝¹ : Module 𝕜 E
p : SeminormFamily 𝕜 E ι
inst✝ : Nonempty ι
i : ι := Classical.arbitrary ι
⊢ (p i).ball 0 1 ∈ p.basisSets
state_after: no goals
Theorem: Set.ncard_insert_eq_ite
File: Mathlib/Data/Set/Card.lean

tactic: by_cases h : a ∈ s
state_before: α : Type u_1
β : Type u_2
s t : Set α
a : α
inst✝ : Decidable (a ∈ s)
hs : autoParam s.Finite _auto✝
⊢ (insert a s).ncard = if a ∈ s then s.ncard else s.ncard + 1
state_after: case pos
α : Type u_1
β : Type u_2
s t : Set α
a : α
inst✝ : Decidable (a ∈ s)
hs : autoParam s.Finite _auto✝
h : a ∈ s
⊢ (insert a s).ncard = if a ∈ s then s.ncard else s.ncard + 1

case neg
α : Type u_1
β : Type u_2
s t : Set α
a : α
inst✝ : Decidable (a ∈ s)
hs : autoParam s.Finite _auto✝
h : a ∉ s
⊢ (insert a s).ncard = if a ∈ s then s.ncard else s.ncard + 1

tactic: rw [ncard_insert_of_mem h, if_pos h]
state_before: case pos
α : Type u_1
β : Type u_2
s t : Set α
a : α
inst✝ : Decidable (a ∈ s)
hs : autoParam s.Finite _auto✝
h : a ∈ s
⊢ (insert a s).ncard = if a ∈ s then s.ncard else s.ncard + 1
state_after: no goals

tactic: rw [ncard_insert_of_not_mem h hs, if_neg h]
state_before: case neg
α : Type u_1
β : Type u_2
s t : Set α
a : α
inst✝ : Decidable (a ∈ s)
hs : autoParam s.Finite _auto✝
h : a ∉ s
⊢ (insert a s).ncard = if a ∈ s then s.ncard else s.ncard + 1
state_after: no goals
Theorem: Nat.card_multiples'
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: simp [Finset.filter_false_of_mem]
state_before: case zero
a b m n✝ p n : ℕ
⊢ (Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range (succ 0))).card = 0 / n
state_after: no goals

tactic: rw [Finset.range_succ, Finset.filter_insert]
state_before: case succ
a b m n✝ p n N : ℕ
ih : (Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range N.succ)).card = N / n
⊢ (Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range (N + 1).succ)).card = (N + 1) / n
state_after: case succ
a b m n✝ p n N : ℕ
ih : (Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range N.succ)).card = N / n
⊢ (if N + 1 ≠ 0 ∧ n ∣ N + 1 then insert (N + 1) (Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range (N + 1)))
      else Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range (N + 1))).card =
    (N + 1) / n

tactic: by_cases h : n ∣ N.succ
state_before: case succ
a b m n✝ p n N : ℕ
ih : (Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range N.succ)).card = N / n
⊢ (if N + 1 ≠ 0 ∧ n ∣ N + 1 then insert (N + 1) (Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range (N + 1)))
      else Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range (N + 1))).card =
    (N + 1) / n
state_after: case pos
a b m n✝ p n N : ℕ
ih : (Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range N.succ)).card = N / n
h : n ∣ N.succ
⊢ (if N + 1 ≠ 0 ∧ n ∣ N + 1 then insert (N + 1) (Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range (N + 1)))
      else Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range (N + 1))).card =
    (N + 1) / n

case neg
a b m n✝ p n N : ℕ
ih : (Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range N.succ)).card = N / n
h : ¬n ∣ N.succ
⊢ (if N + 1 ≠ 0 ∧ n ∣ N + 1 then insert (N + 1) (Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range (N + 1)))
      else Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range (N + 1))).card =
    (N + 1) / n

tactic: simp [h, succ_div_of_dvd, ih]
state_before: case pos
a b m n✝ p n N : ℕ
ih : (Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range N.succ)).card = N / n
h : n ∣ N.succ
⊢ (if N + 1 ≠ 0 ∧ n ∣ N + 1 then insert (N + 1) (Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range (N + 1)))
      else Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range (N + 1))).card =
    (N + 1) / n
state_after: no goals

tactic: simp [h, succ_div_of_not_dvd, ih]
state_before: case neg
a b m n✝ p n N : ℕ
ih : (Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range N.succ)).card = N / n
h : ¬n ∣ N.succ
⊢ (if N + 1 ≠ 0 ∧ n ∣ N + 1 then insert (N + 1) (Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range (N + 1)))
      else Finset.filter (fun k => k ≠ 0 ∧ n ∣ k) (Finset.range (N + 1))).card =
    (N + 1) / n
state_after: no goals
Theorem: CategoryTheory.CartesianClosed.curry_id_eq_coev
File: Mathlib/CategoryTheory/Closed/Cartesian.lean

tactic: rw [curry_eq, (exp A).map_id (A ⨯ _)]
state_before: C : Type u
inst✝³ : Category.{v, u} C
A✝ B X✝ X' Y Y' Z : C
inst✝² : HasFiniteProducts C
inst✝¹ : Exponentiable A✝
A X : C
inst✝ : Exponentiable A
⊢ curry (𝟙 (A ⨯ (𝟭 C).obj X)) = (exp.coev A).app X
state_after: C : Type u
inst✝³ : Category.{v, u} C
A✝ B X✝ X' Y Y' Z : C
inst✝² : HasFiniteProducts C
inst✝¹ : Exponentiable A✝
A X : C
inst✝ : Exponentiable A
⊢ (exp.coev A).app ((𝟭 C).obj X) ≫ 𝟙 (A ⟹ A ⨯ (𝟭 C).obj X) = (exp.coev A).app X

tactic: apply comp_id
state_before: C : Type u
inst✝³ : Category.{v, u} C
A✝ B X✝ X' Y Y' Z : C
inst✝² : HasFiniteProducts C
inst✝¹ : Exponentiable A✝
A X : C
inst✝ : Exponentiable A
⊢ (exp.coev A).app ((𝟭 C).obj X) ≫ 𝟙 (A ⟹ A ⨯ (𝟭 C).obj X) = (exp.coev A).app X
state_after: no goals
Theorem: Nat.factorization_ord_compl
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: simp [hn]
state_before: a b m n✝ p✝ n p : ℕ
hn : n = 0
⊢ (n / p ^ n.factorization p).factorization = Finsupp.erase p n.factorization
state_after: no goals

tactic: if pp : p.Prime then ?_ else
  rw [Finsupp.erase_of_not_mem_support] <;> simp [pp]
state_before: a b m n✝ p✝ n p : ℕ
hn : ¬n = 0
⊢ (n / p ^ n.factorization p).factorization = Finsupp.erase p n.factorization
state_after: a b m n✝ p✝ n p : ℕ
hn : ¬n = 0
pp : Prime p
⊢ (n / p ^ n.factorization p).factorization = Finsupp.erase p n.factorization

tactic: ext q
state_before: a b m n✝ p✝ n p : ℕ
hn : ¬n = 0
pp : Prime p
⊢ (n / p ^ n.factorization p).factorization = Finsupp.erase p n.factorization
state_after: case h
a b m n✝ p✝ n p : ℕ
hn : ¬n = 0
pp : Prime p
q : ℕ
⊢ (n / p ^ n.factorization p).factorization q = (Finsupp.erase p n.factorization) q

tactic: rcases eq_or_ne q p with (rfl | hqp)
state_before: case h
a b m n✝ p✝ n p : ℕ
hn : ¬n = 0
pp : Prime p
q : ℕ
⊢ (n / p ^ n.factorization p).factorization q = (Finsupp.erase p n.factorization) q
state_after: case h.inl
a b m n✝ p n : ℕ
hn : ¬n = 0
q : ℕ
pp : Prime q
⊢ (n / q ^ n.factorization q).factorization q = (Finsupp.erase q n.factorization) q

case h.inr
a b m n✝ p✝ n p : ℕ
hn : ¬n = 0
pp : Prime p
q : ℕ
hqp : q ≠ p
⊢ (n / p ^ n.factorization p).factorization q = (Finsupp.erase p n.factorization) q

tactic: rw [Finsupp.erase_of_not_mem_support] <;> simp [pp]
state_before: a b m n✝ p✝ n p : ℕ
hn : ¬n = 0
pp : ¬Prime p
⊢ (n / p ^ n.factorization p).factorization = Finsupp.erase p n.factorization
state_after: no goals

tactic: simp only [Finsupp.erase_same, factorization_eq_zero_iff, not_dvd_ord_compl pp hn]
state_before: case h.inl
a b m n✝ p n : ℕ
hn : ¬n = 0
q : ℕ
pp : Prime q
⊢ (n / q ^ n.factorization q).factorization q = (Finsupp.erase q n.factorization) q
state_after: case h.inl
a b m n✝ p n : ℕ
hn : ¬n = 0
q : ℕ
pp : Prime q
⊢ ¬Prime q ∨ ¬False ∨ n / q ^ n.factorization q = 0

tactic: simp
state_before: case h.inl
a b m n✝ p n : ℕ
hn : ¬n = 0
q : ℕ
pp : Prime q
⊢ ¬Prime q ∨ ¬False ∨ n / q ^ n.factorization q = 0
state_after: no goals

tactic: rw [Finsupp.erase_ne hqp, factorization_div (ord_proj_dvd n p)]
state_before: case h.inr
a b m n✝ p✝ n p : ℕ
hn : ¬n = 0
pp : Prime p
q : ℕ
hqp : q ≠ p
⊢ (n / p ^ n.factorization p).factorization q = (Finsupp.erase p n.factorization) q
state_after: case h.inr
a b m n✝ p✝ n p : ℕ
hn : ¬n = 0
pp : Prime p
q : ℕ
hqp : q ≠ p
⊢ (n.factorization - (p ^ n.factorization p).factorization) q = n.factorization q

tactic: simp [pp.factorization, hqp.symm]
state_before: case h.inr
a b m n✝ p✝ n p : ℕ
hn : ¬n = 0
pp : Prime p
q : ℕ
hqp : q ≠ p
⊢ (n.factorization - (p ^ n.factorization p).factorization) q = n.factorization q
state_after: no goals
Theorem: IsChain.superChain_succChain
File: Mathlib/Order/Chain.lean

tactic: simp only [IsMaxChain, _root_.not_and, not_forall, exists_prop, exists_and_left] at hs₂
state_before: α : Type u_1
β : Type u_2
r : α → α → Prop
c c₁ c₂ c₃ s t : Set α
a b x y : α
hs₁ : IsChain r s
hs₂ : ¬IsMaxChain r s
⊢ SuperChain r s (SuccChain r s)
state_after: α : Type u_1
β : Type u_2
r : α → α → Prop
c c₁ c₂ c₃ s t : Set α
a b x y : α
hs₁ : IsChain r s
hs₂ : IsChain r s → ∃ x, IsChain r x ∧ s ⊆ x ∧ ¬s = x
⊢ SuperChain r s (SuccChain r s)

tactic: obtain ⟨t, ht, hst⟩ := hs₂ hs₁
state_before: α : Type u_1
β : Type u_2
r : α → α → Prop
c c₁ c₂ c₃ s t : Set α
a b x y : α
hs₁ : IsChain r s
hs₂ : IsChain r s → ∃ x, IsChain r x ∧ s ⊆ x ∧ ¬s = x
⊢ SuperChain r s (SuccChain r s)
state_after: case intro.intro
α : Type u_1
β : Type u_2
r : α → α → Prop
c c₁ c₂ c₃ s t✝ : Set α
a b x y : α
hs₁ : IsChain r s
hs₂ : IsChain r s → ∃ x, IsChain r x ∧ s ⊆ x ∧ ¬s = x
t : Set α
ht : IsChain r t
hst : s ⊆ t ∧ ¬s = t
⊢ SuperChain r s (SuccChain r s)

tactic: exact succChain_spec ⟨t, hs₁, ht, ssubset_iff_subset_ne.2 hst⟩
state_before: case intro.intro
α : Type u_1
β : Type u_2
r : α → α → Prop
c c₁ c₂ c₃ s t✝ : Set α
a b x y : α
hs₁ : IsChain r s
hs₂ : IsChain r s → ∃ x, IsChain r x ∧ s ⊆ x ∧ ¬s = x
t : Set α
ht : IsChain r t
hst : s ⊆ t ∧ ¬s = t
⊢ SuperChain r s (SuccChain r s)
state_after: no goals
Theorem: midpoint_eq_right_iff
File: Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean

tactic: rw [midpoint_comm, midpoint_eq_left_iff, eq_comm]
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁷ : Ring R
inst✝⁶ : Invertible 2
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x✝ y✝ z x y : P
⊢ midpoint R x y = y ↔ x = y
state_after: no goals
Theorem: WithTop.mul_top
File: Mathlib/Algebra/Order/Ring/WithTop.lean

tactic: rw [mul_top', if_neg h]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b : WithTop α
h : a ≠ 0
⊢ a * ⊤ = ⊤
state_after: no goals
Theorem: inner_self_eq_norm_mul_norm
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: rw [@norm_eq_sqrt_inner 𝕜, ← sqrt_mul inner_self_nonneg (re ⟪x, x⟫),
  sqrt_mul_self inner_self_nonneg]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : _root_.RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
x : E
⊢ re ⟪x, x⟫_𝕜 = ‖x‖ * ‖x‖
state_after: no goals
Theorem: ModuleCat.MonoidalCategory.pentagon
File: Mathlib/Algebra/Category/ModuleCat/Monoidal/Basic.lean

tactic: convert pentagon_aux R W X Y Z using 1
state_before: R : Type u
inst✝ : CommRing R
W : ModuleCat R
X : ModuleCat R
Y : ModuleCat R
Z : ModuleCat R
⊢ whiskerRight (associator W X Y).hom Z ≫ (associator W (tensorObj X Y) Z).hom ≫ whiskerLeft W (associator X Y Z).hom =
    (associator (tensorObj W X) Y Z).hom ≫ (associator W X (tensorObj Y Z)).hom
state_after: no goals
Theorem: Complex.polarCoord_apply
File: Mathlib/Analysis/SpecialFunctions/PolarCoord.lean

tactic: simp_rw [Complex.abs_def, Complex.normSq_apply, ← pow_two]
state_before: a : ℂ
⊢ ↑Complex.polarCoord a = (abs a, a.arg)
state_after: a : ℂ
⊢ ↑Complex.polarCoord a = (√(a.re ^ 2 + a.im ^ 2), a.arg)

tactic: rfl
state_before: a : ℂ
⊢ ↑Complex.polarCoord a = (√(a.re ^ 2 + a.im ^ 2), a.arg)
state_after: no goals
Theorem: ProbabilityTheory.kernel.const_add
File: Mathlib/Probability/Kernel/Basic.lean

tactic: ext
state_before: α : Type u_1
β✝ : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β✝
κ : ↥(kernel α β✝)
β : Type u_4
inst✝ : MeasurableSpace β
μ ν : Measure α
⊢ const β (μ + ν) = const β μ + const β ν
state_after: case h.h
α : Type u_1
β✝ : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β✝
κ : ↥(kernel α β✝)
β : Type u_4
inst✝ : MeasurableSpace β
μ ν : Measure α
a✝¹ : β
s✝ : Set α
a✝ : MeasurableSet s✝
⊢ ((const β (μ + ν)) a✝¹) s✝ = ((const β μ + const β ν) a✝¹) s✝

tactic: simp
state_before: case h.h
α : Type u_1
β✝ : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β✝
κ : ↥(kernel α β✝)
β : Type u_4
inst✝ : MeasurableSpace β
μ ν : Measure α
a✝¹ : β
s✝ : Set α
a✝ : MeasurableSet s✝
⊢ ((const β (μ + ν)) a✝¹) s✝ = ((const β μ + const β ν) a✝¹) s✝
state_after: no goals
Theorem: ZNum.gcd_to_nat
File: Mathlib/Data/Num/Lemmas.lean

tactic: simp only [abs_to_nat]
state_before: a b : ZNum
⊢ (↑a.abs).gcd ↑b.abs = (↑a).gcd ↑b
state_after: a b : ZNum
⊢ (↑a).natAbs.gcd (↑b).natAbs = (↑a).gcd ↑b

tactic: rfl
state_before: a b : ZNum
⊢ (↑a).natAbs.gcd (↑b).natAbs = (↑a).gcd ↑b
state_after: no goals
Theorem: Real.sq_le
File: Mathlib/Data/Real/Sqrt.lean

tactic: constructor
state_before: x y : ℝ
h : 0 ≤ y
⊢ x ^ 2 ≤ y ↔ -√y ≤ x ∧ x ≤ √y
state_after: case mp
x y : ℝ
h : 0 ≤ y
⊢ x ^ 2 ≤ y → -√y ≤ x ∧ x ≤ √y

case mpr
x y : ℝ
h : 0 ≤ y
⊢ -√y ≤ x ∧ x ≤ √y → x ^ 2 ≤ y

tactic: simpa only [abs_le] using abs_le_sqrt
state_before: case mp
x y : ℝ
h : 0 ≤ y
⊢ x ^ 2 ≤ y → -√y ≤ x ∧ x ≤ √y
state_after: no goals

tactic: rw [← abs_le, ← sq_abs]
state_before: case mpr
x y : ℝ
h : 0 ≤ y
⊢ -√y ≤ x ∧ x ≤ √y → x ^ 2 ≤ y
state_after: case mpr
x y : ℝ
h : 0 ≤ y
⊢ |x| ≤ √y → |x| ^ 2 ≤ y

tactic: exact (le_sqrt (abs_nonneg x) h).mp
state_before: case mpr
x y : ℝ
h : 0 ≤ y
⊢ |x| ≤ √y → |x| ^ 2 ≤ y
state_after: no goals
Theorem: DomMulAct.stabilizer_card
File: Mathlib/GroupTheory/Perm/DomMulAct.lean

tactic: rw [← Nat.card_eq_fintype_card, Nat.card_congr (subtypeEquiv mk fun _ ↦ ?_),
  Nat.card_congr MulOpposite.opEquiv,
  Nat.card_congr (DomMulAct.stabilizerMulEquiv f).toEquiv, Nat.card_pi]
state_before: α : Type u_1
ι : Type u_2
f : α → ι
inst✝³ : Fintype α
inst✝² : Fintype ι
inst✝¹ : DecidableEq α
inst✝ : DecidableEq ι
⊢ Fintype.card { g // f ∘ ⇑g = f } = ∏ i : ι, (Fintype.card { a // f a = i })!
state_after: α : Type u_1
ι : Type u_2
f : α → ι
inst✝³ : Fintype α
inst✝² : Fintype ι
inst✝¹ : DecidableEq α
inst✝ : DecidableEq ι
⊢ ∏ a : ι, Nat.card (Perm { a_1 // f a_1 = a }) = ∏ i : ι, (Fintype.card { a // f a = i })!

α : Type u_1
ι : Type u_2
f : α → ι
inst✝³ : Fintype α
inst✝² : Fintype ι
inst✝¹ : DecidableEq α
inst✝ : DecidableEq ι
x✝ : Perm α
⊢ f ∘ ⇑x✝ = f ↔ mk x✝ ∈ stabilizer (Perm α)ᵈᵐᵃ f

tactic: exact Finset.prod_congr rfl fun i _ ↦ by rw [Nat.card_eq_fintype_card, Fintype.card_perm]
state_before: α : Type u_1
ι : Type u_2
f : α → ι
inst✝³ : Fintype α
inst✝² : Fintype ι
inst✝¹ : DecidableEq α
inst✝ : DecidableEq ι
⊢ ∏ a : ι, Nat.card (Perm { a_1 // f a_1 = a }) = ∏ i : ι, (Fintype.card { a // f a = i })!
state_after: no goals

tactic: rw [Nat.card_eq_fintype_card, Fintype.card_perm]
state_before: α : Type u_1
ι : Type u_2
f : α → ι
inst✝³ : Fintype α
inst✝² : Fintype ι
inst✝¹ : DecidableEq α
inst✝ : DecidableEq ι
i : ι
x✝ : i ∈ Finset.univ
⊢ Nat.card (Perm { a // f a = i }) = (Fintype.card { a // f a = i })!
state_after: no goals

tactic: rfl
state_before: α : Type u_1
ι : Type u_2
f : α → ι
inst✝³ : Fintype α
inst✝² : Fintype ι
inst✝¹ : DecidableEq α
inst✝ : DecidableEq ι
x✝ : Perm α
⊢ f ∘ ⇑x✝ = f ↔ mk x✝ ∈ stabilizer (Perm α)ᵈᵐᵃ f
state_after: no goals
Theorem: Seminorm.bddBelow_range_add
File: Mathlib/Analysis/Seminorm.lean

tactic: rintro _ ⟨x, rfl⟩
state_before: R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝² : NormedField 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
p q : Seminorm 𝕜 E
x : E
⊢ 0 ∈ lowerBounds (range fun u => p u + q (x - u))
state_after: case intro
R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝² : NormedField 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
p q : Seminorm 𝕜 E
x✝ x : E
⊢ 0 ≤ (fun u => p u + q (x✝ - u)) x

tactic: dsimp
state_before: case intro
R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝² : NormedField 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
p q : Seminorm 𝕜 E
x✝ x : E
⊢ 0 ≤ (fun u => p u + q (x✝ - u)) x
state_after: case intro
R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝² : NormedField 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
p q : Seminorm 𝕜 E
x✝ x : E
⊢ 0 ≤ p x + q (x✝ - x)

tactic: positivity
state_before: case intro
R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝² : NormedField 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
p q : Seminorm 𝕜 E
x✝ x : E
⊢ 0 ≤ p x + q (x✝ - x)
state_after: no goals
Theorem: WeierstrassCurve.twoTorsionPolynomial_disc_isUnit
File: Mathlib/AlgebraicGeometry/EllipticCurve/Weierstrass.lean

tactic: rw [twoTorsionPolynomial_disc, IsUnit.mul_iff, show (16 : R) = 2 ^ 4 by norm_num1]
state_before: R : Type u
inst✝¹ : CommRing R
W : WeierstrassCurve R
inst✝ : Invertible 2
⊢ IsUnit W.twoTorsionPolynomial.disc ↔ IsUnit W.Δ
state_after: R : Type u
inst✝¹ : CommRing R
W : WeierstrassCurve R
inst✝ : Invertible 2
⊢ IsUnit (2 ^ 4) ∧ IsUnit W.Δ ↔ IsUnit W.Δ

tactic: exact and_iff_right <| isUnit_of_invertible <| 2 ^ 4
state_before: R : Type u
inst✝¹ : CommRing R
W : WeierstrassCurve R
inst✝ : Invertible 2
⊢ IsUnit (2 ^ 4) ∧ IsUnit W.Δ ↔ IsUnit W.Δ
state_after: no goals

tactic: norm_num1
state_before: R : Type u
inst✝¹ : CommRing R
W : WeierstrassCurve R
inst✝ : Invertible 2
⊢ 16 = 2 ^ 4
state_after: no goals
Theorem: SModEq.zero
File: Mathlib/LinearAlgebra/SModEq.lean

tactic: rw [SModEq.def, Submodule.Quotient.eq, sub_zero]
state_before: R : Type u_1
inst✝⁵ : Ring R
A : Type u_2
inst✝⁴ : CommRing A
M : Type u_3
inst✝³ : AddCommGroup M
inst✝² : Module R M
U U₁ U₂ : Submodule R M
x x₁ x₂ y y₁ y₂ z z₁ z₂ : M
N : Type u_4
inst✝¹ : AddCommGroup N
inst✝ : Module R N
V V₁ V₂ : Submodule R N
⊢ x ≡ 0 [SMOD U] ↔ x ∈ U
state_after: no goals
Theorem: WittVector.aeval_verschiebung_poly'
File: Mathlib/RingTheory/WittVector/Verschiebung.lean

tactic: cases' n with n
state_before: p : ℕ
R : Type u_1
S : Type u_2
hp : Fact (Nat.Prime p)
inst✝¹ : CommRing R
inst✝ : CommRing S
x : 𝕎 R
n : ℕ
⊢ (aeval x.coeff) (verschiebungPoly n) = x.verschiebungFun.coeff n
state_after: case zero
p : ℕ
R : Type u_1
S : Type u_2
hp : Fact (Nat.Prime p)
inst✝¹ : CommRing R
inst✝ : CommRing S
x : 𝕎 R
⊢ (aeval x.coeff) (verschiebungPoly 0) = x.verschiebungFun.coeff 0

case succ
p : ℕ
R : Type u_1
S : Type u_2
hp : Fact (Nat.Prime p)
inst✝¹ : CommRing R
inst✝ : CommRing S
x : 𝕎 R
n : ℕ
⊢ (aeval x.coeff) (verschiebungPoly (n + 1)) = x.verschiebungFun.coeff (n + 1)

tactic: simp only [verschiebungPoly, Nat.zero_eq, ge_iff_le, tsub_eq_zero_of_le, ite_true, map_zero,
verschiebungFun_coeff_zero]
state_before: case zero
p : ℕ
R : Type u_1
S : Type u_2
hp : Fact (Nat.Prime p)
inst✝¹ : CommRing R
inst✝ : CommRing S
x : 𝕎 R
⊢ (aeval x.coeff) (verschiebungPoly 0) = x.verschiebungFun.coeff 0
state_after: no goals

tactic: rw [verschiebungPoly, verschiebungFun_coeff_succ, if_neg n.succ_ne_zero, aeval_X,
  add_tsub_cancel_right]
state_before: case succ
p : ℕ
R : Type u_1
S : Type u_2
hp : Fact (Nat.Prime p)
inst✝¹ : CommRing R
inst✝ : CommRing S
x : 𝕎 R
n : ℕ
⊢ (aeval x.coeff) (verschiebungPoly (n + 1)) = x.verschiebungFun.coeff (n + 1)
state_after: no goals
Theorem: Finset.noncommProd_eq_prod
File: Mathlib/Data/Finset/NoncommProd.lean

tactic: induction' s using Finset.cons_induction_on with a s ha IH
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β✝ : Type u_4
γ : Type u_5
f✝ : α → β✝ → β✝
op : α → α → α
inst✝³ : Monoid β✝
inst✝² : Monoid γ
inst✝¹ : FunLike F β✝ γ
β : Type u_6
inst✝ : CommMonoid β
s : Finset α
f : α → β
⊢ s.noncommProd f ⋯ = s.prod f
state_after: case h₁
F : Type u_1
ι : Type u_2
α : Type u_3
β✝ : Type u_4
γ : Type u_5
f✝ : α → β✝ → β✝
op : α → α → α
inst✝³ : Monoid β✝
inst✝² : Monoid γ
inst✝¹ : FunLike F β✝ γ
β : Type u_6
inst✝ : CommMonoid β
f : α → β
⊢ ∅.noncommProd f ⋯ = ∅.prod f

case h₂
F : Type u_1
ι : Type u_2
α : Type u_3
β✝ : Type u_4
γ : Type u_5
f✝ : α → β✝ → β✝
op : α → α → α
inst✝³ : Monoid β✝
inst✝² : Monoid γ
inst✝¹ : FunLike F β✝ γ
β : Type u_6
inst✝ : CommMonoid β
f : α → β
a : α
s : Finset α
ha : a ∉ s
IH : s.noncommProd f ⋯ = s.prod f
⊢ (cons a s ha).noncommProd f ⋯ = (cons a s ha).prod f

tactic: simp
state_before: case h₁
F : Type u_1
ι : Type u_2
α : Type u_3
β✝ : Type u_4
γ : Type u_5
f✝ : α → β✝ → β✝
op : α → α → α
inst✝³ : Monoid β✝
inst✝² : Monoid γ
inst✝¹ : FunLike F β✝ γ
β : Type u_6
inst✝ : CommMonoid β
f : α → β
⊢ ∅.noncommProd f ⋯ = ∅.prod f
state_after: no goals

tactic: simp [ha, IH]
state_before: case h₂
F : Type u_1
ι : Type u_2
α : Type u_3
β✝ : Type u_4
γ : Type u_5
f✝ : α → β✝ → β✝
op : α → α → α
inst✝³ : Monoid β✝
inst✝² : Monoid γ
inst✝¹ : FunLike F β✝ γ
β : Type u_6
inst✝ : CommMonoid β
f : α → β
a : α
s : Finset α
ha : a ∉ s
IH : s.noncommProd f ⋯ = s.prod f
⊢ (cons a s ha).noncommProd f ⋯ = (cons a s ha).prod f
state_after: no goals
Theorem: Real.pow_div_factorial_le_exp
File: Mathlib/Data/Complex/Exponential.lean

tactic: positivity
state_before: x y : ℝ
hx : 0 ≤ x
n k : ℕ
x✝ : k ∈ range (n + 1)
⊢ 0 ≤ (fun k => x ^ k / ↑k !) k
state_after: no goals
Theorem: List.perm_lookupAll
File: Mathlib/Data/List/Sigma.lean

tactic: simp [lookupAll_eq_dlookup, nd₁, nd₂, perm_dlookup a nd₁ nd₂ p]
state_before: α : Type u
β : α → Type v
l l₁✝ l₂✝ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l₁ l₂ : List (Sigma β)
nd₁ : l₁.NodupKeys
nd₂ : l₂.NodupKeys
p : l₁ ~ l₂
⊢ lookupAll a l₁ = lookupAll a l₂
state_after: no goals