1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Fintype.prod_subsingleton
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: haveI : Unique α := uniqueOfSubsingleton a
state_before: ι✝ : Type u_1
κ✝ : Type u_2
α✝¹ : Type u_3
β✝ : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α✝¹
a✝ : α✝¹
f✝ g : α✝¹ → β✝
ι : Type u_6
κ : Type u_7
α✝ : Type u_8
inst✝⁵ : Fintype ι
inst✝⁴ : Fintype κ
inst✝³ : CommMonoid α✝
α : Type u_9
β : Type u_10
inst✝² : CommMonoid β
inst✝¹ : Subsingleton α
inst✝ : Fintype α
f : α → β
a : α
⊢ ∏ x : α, f x = f a
state_after: ι✝ : Type u_1
κ✝ : Type u_2
α✝¹ : Type u_3
β✝ : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α✝¹
a✝ : α✝¹
f✝ g : α✝¹ → β✝
ι : Type u_6
κ : Type u_7
α✝ : Type u_8
inst✝⁵ : Fintype ι
inst✝⁴ : Fintype κ
inst✝³ : CommMonoid α✝
α : Type u_9
β : Type u_10
inst✝² : CommMonoid β
inst✝¹ : Subsingleton α
inst✝ : Fintype α
f : α → β
a : α
this : Unique α
⊢ ∏ x : α, f x = f a

tactic: rw [prod_unique f, Subsingleton.elim default a]
state_before: ι✝ : Type u_1
κ✝ : Type u_2
α✝¹ : Type u_3
β✝ : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α✝¹
a✝ : α✝¹
f✝ g : α✝¹ → β✝
ι : Type u_6
κ : Type u_7
α✝ : Type u_8
inst✝⁵ : Fintype ι
inst✝⁴ : Fintype κ
inst✝³ : CommMonoid α✝
α : Type u_9
β : Type u_10
inst✝² : CommMonoid β
inst✝¹ : Subsingleton α
inst✝ : Fintype α
f : α → β
a : α
this : Unique α
⊢ ∏ x : α, f x = f a
state_after: no goals
Theorem: padicValInt.eq_zero_of_not_dvd
File: Mathlib/NumberTheory/Padics/PadicVal.lean

tactic: rw [padicValInt, padicValNat]
state_before: p : ℕ
z : ℤ
h : ¬↑p ∣ z
⊢ padicValInt p z = 0
state_after: p : ℕ
z : ℤ
h : ¬↑p ∣ z
⊢ (if h : p ≠ 1 ∧ 0 < z.natAbs then (multiplicity p z.natAbs).get ⋯ else 0) = 0

tactic: split_ifs <;> simp [multiplicity.Int.natAbs, multiplicity_eq_zero.2 h]
state_before: p : ℕ
z : ℤ
h : ¬↑p ∣ z
⊢ (if h : p ≠ 1 ∧ 0 < z.natAbs then (multiplicity p z.natAbs).get ⋯ else 0) = 0
state_after: no goals
Theorem: Finset.mem_shadow_iff_exists_mem_card_add_one
File: Mathlib/Combinatorics/SetFamily/Shadow.lean

tactic: refine mem_shadow_iff_exists_sdiff.trans <| exists_congr fun t ↦ and_congr_right fun _ ↦
  and_congr_right fun hst ↦ ?_
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
k r : ℕ
⊢ t ∈ ∂ 𝒜 ↔ ∃ s ∈ 𝒜, t ⊆ s ∧ s.card = t.card + 1
state_after: α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t✝ : Finset α
a : α
k r : ℕ
t : Finset α
x✝ : t ∈ 𝒜
hst : t✝ ⊆ t
⊢ (t \ t✝).card = 1 ↔ t.card = t✝.card + 1

tactic: rw [card_sdiff hst, tsub_eq_iff_eq_add_of_le, add_comm]
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t✝ : Finset α
a : α
k r : ℕ
t : Finset α
x✝ : t ∈ 𝒜
hst : t✝ ⊆ t
⊢ (t \ t✝).card = 1 ↔ t.card = t✝.card + 1
state_after: α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t✝ : Finset α
a : α
k r : ℕ
t : Finset α
x✝ : t ∈ 𝒜
hst : t✝ ⊆ t
⊢ t✝.card ≤ t.card

tactic: exact card_mono hst
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t✝ : Finset α
a : α
k r : ℕ
t : Finset α
x✝ : t ∈ 𝒜
hst : t✝ ⊆ t
⊢ t✝.card ≤ t.card
state_after: no goals
Theorem: CategoryTheory.isIso_pi_iff
File: Mathlib/CategoryTheory/Pi/Basic.lean

tactic: constructor
state_before: I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝ : (i : I) → Category.{v₁, u₁} (C i)
X Y : (i : I) → C i
f : X ⟶ Y
⊢ IsIso f ↔ ∀ (i : I), IsIso (f i)
state_after: case mp
I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝ : (i : I) → Category.{v₁, u₁} (C i)
X Y : (i : I) → C i
f : X ⟶ Y
⊢ IsIso f → ∀ (i : I), IsIso (f i)

case mpr
I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝ : (i : I) → Category.{v₁, u₁} (C i)
X Y : (i : I) → C i
f : X ⟶ Y
⊢ (∀ (i : I), IsIso (f i)) → IsIso f

tactic: intro _ i
state_before: case mp
I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝ : (i : I) → Category.{v₁, u₁} (C i)
X Y : (i : I) → C i
f : X ⟶ Y
⊢ IsIso f → ∀ (i : I), IsIso (f i)
state_after: case mp
I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝ : (i : I) → Category.{v₁, u₁} (C i)
X Y : (i : I) → C i
f : X ⟶ Y
a✝ : IsIso f
i : I
⊢ IsIso (f i)

tactic: exact (Pi.isoApp (asIso f) i).isIso_hom
state_before: case mp
I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝ : (i : I) → Category.{v₁, u₁} (C i)
X Y : (i : I) → C i
f : X ⟶ Y
a✝ : IsIso f
i : I
⊢ IsIso (f i)
state_after: no goals

tactic: intro
state_before: case mpr
I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝ : (i : I) → Category.{v₁, u₁} (C i)
X Y : (i : I) → C i
f : X ⟶ Y
⊢ (∀ (i : I), IsIso (f i)) → IsIso f
state_after: case mpr
I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝ : (i : I) → Category.{v₁, u₁} (C i)
X Y : (i : I) → C i
f : X ⟶ Y
a✝ : ∀ (i : I), IsIso (f i)
⊢ IsIso f

tactic: exact ⟨fun i => inv (f i), by aesop_cat, by aesop_cat⟩
state_before: case mpr
I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝ : (i : I) → Category.{v₁, u₁} (C i)
X Y : (i : I) → C i
f : X ⟶ Y
a✝ : ∀ (i : I), IsIso (f i)
⊢ IsIso f
state_after: no goals

tactic: aesop_cat
state_before: I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝ : (i : I) → Category.{v₁, u₁} (C i)
X Y : (i : I) → C i
f : X ⟶ Y
a✝ : ∀ (i : I), IsIso (f i)
⊢ (f ≫ fun i => inv (f i)) = 𝟙 X
state_after: no goals

tactic: aesop_cat
state_before: I : Type w₀
J : Type w₁
C : I → Type u₁
inst✝ : (i : I) → Category.{v₁, u₁} (C i)
X Y : (i : I) → C i
f : X ⟶ Y
a✝ : ∀ (i : I), IsIso (f i)
⊢ (fun i => inv (f i)) ≫ f = 𝟙 Y
state_after: no goals
Theorem: CochainComplex.HomComplex.Cochain.comp_assoc_of_first_is_zero_cochain
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean

tactic: omega
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n m n₂ n₃ n₂₃ : ℤ
z₁ : Cochain F G 0
z₂ : Cochain G K n₂
z₃ : Cochain K L n₃
h₂₃ : n₂ + n₃ = n₂₃
⊢ 0 + n₂ + n₃ = n₂₃
state_after: no goals
Theorem: MvPolynomial.vars_add_of_disjoint
File: Mathlib/Algebra/MvPolynomial/Variables.lean

tactic: refine (vars_add_subset p q).antisymm fun x hx => ?_
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
p q : MvPolynomial σ R
inst✝ : DecidableEq σ
h : Disjoint p.vars q.vars
⊢ (p + q).vars = p.vars ∪ q.vars
state_after: R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
p q : MvPolynomial σ R
inst✝ : DecidableEq σ
h : Disjoint p.vars q.vars
x : σ
hx : x ∈ p.vars ∪ q.vars
⊢ x ∈ (p + q).vars

tactic: simp only [vars_def, Multiset.disjoint_toFinset] at h hx ⊢
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
p q : MvPolynomial σ R
inst✝ : DecidableEq σ
h : Disjoint p.vars q.vars
x : σ
hx : x ∈ p.vars ∪ q.vars
⊢ x ∈ (p + q).vars
state_after: R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
p q : MvPolynomial σ R
inst✝ : DecidableEq σ
x : σ
h : p.degrees.Disjoint q.degrees
hx : x ∈ p.degrees.toFinset ∪ q.degrees.toFinset
⊢ x ∈ (p + q).degrees.toFinset

tactic: rwa [degrees_add_of_disjoint h, Multiset.toFinset_union]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
p q : MvPolynomial σ R
inst✝ : DecidableEq σ
x : σ
h : p.degrees.Disjoint q.degrees
hx : x ∈ p.degrees.toFinset ∪ q.degrees.toFinset
⊢ x ∈ (p + q).degrees.toFinset
state_after: no goals
Theorem: HomologicalComplex.cyclesMap_comp
File: Mathlib/Algebra/Homology/ShortComplex/HomologicalComplex.lean

tactic: dsimp [cyclesMap]
state_before: C : Type u_1
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ : K ⟶ L
ψ : L ⟶ M
i j k : ι
inst✝² : K.HasHomology i
inst✝¹ : L.HasHomology i
inst✝ : M.HasHomology i
⊢ cyclesMap (φ ≫ ψ) i = cyclesMap φ i ≫ cyclesMap ψ i
state_after: C : Type u_1
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ : K ⟶ L
ψ : L ⟶ M
i j k : ι
inst✝² : K.HasHomology i
inst✝¹ : L.HasHomology i
inst✝ : M.HasHomology i
⊢ ShortComplex.cyclesMap ((shortComplexFunctor C c i).map (φ ≫ ψ)) =
    ShortComplex.cyclesMap ((shortComplexFunctor C c i).map φ) ≫
      ShortComplex.cyclesMap ((shortComplexFunctor C c i).map ψ)

tactic: rw [Functor.map_comp, ShortComplex.cyclesMap_comp]
state_before: C : Type u_1
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ : K ⟶ L
ψ : L ⟶ M
i j k : ι
inst✝² : K.HasHomology i
inst✝¹ : L.HasHomology i
inst✝ : M.HasHomology i
⊢ ShortComplex.cyclesMap ((shortComplexFunctor C c i).map (φ ≫ ψ)) =
    ShortComplex.cyclesMap ((shortComplexFunctor C c i).map φ) ≫
      ShortComplex.cyclesMap ((shortComplexFunctor C c i).map ψ)
state_after: no goals
Theorem: fourierCoeff.const_smul
File: Mathlib/Analysis/Fourier/AddCircle.lean

tactic: simp_rw [fourierCoeff, Pi.smul_apply, ← smul_assoc, smul_eq_mul, mul_comm, ← smul_eq_mul,
  smul_assoc, integral_smul]
state_before: T : ℝ
hT : Fact (0 < T)
E : Type
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : AddCircle T → E
c : ℂ
n : ℤ
⊢ fourierCoeff (c • f) n = c • fourierCoeff f n
state_after: no goals
Theorem: Nat.binaryRec_decreasing
File: Mathlib/Data/Nat/Bits.lean

tactic: rw [div2_val]
state_before: m n : ℕ
h : n ≠ 0
⊢ n.div2 < n
state_after: m n : ℕ
h : n ≠ 0
⊢ n / 2 < n

tactic: apply (div_lt_iff_lt_mul <| succ_pos 1).2
state_before: m n : ℕ
h : n ≠ 0
⊢ n / 2 < n
state_after: m n : ℕ
h : n ≠ 0
⊢ n < n * succ 1

tactic: have := Nat.mul_lt_mul_of_pos_left (lt_succ_self 1)
  (lt_of_le_of_ne n.zero_le h.symm)
state_before: m n : ℕ
h : n ≠ 0
⊢ n < n * succ 1
state_after: m n : ℕ
h : n ≠ 0
this : n * 1 < n * succ 1
⊢ n < n * succ 1

tactic: rwa [Nat.mul_one] at this
state_before: m n : ℕ
h : n ≠ 0
this : n * 1 < n * succ 1
⊢ n < n * succ 1
state_after: no goals
Theorem: Pi.basis_apply
File: Mathlib/LinearAlgebra/StdBasis.lean

tactic: simp
state_before: R : Type u_1
η : Type u_2
ιs : η → Type u_3
Ms : η → Type u_4
inst✝⁴ : Semiring R
inst✝³ : (i : η) → AddCommMonoid (Ms i)
inst✝² : (i : η) → Module R (Ms i)
inst✝¹ : Fintype η
inst✝ : DecidableEq η
s : (j : η) → Basis (ιs j) R (Ms j)
ji : (j : η) × ιs j
⊢ (Pi.basis s).repr ((stdBasis R Ms ji.fst) ((s ji.fst) ji.snd)) = Finsupp.single ji 1
state_after: no goals
Theorem: Int.cast_negOfNat
File: Mathlib/Data/Int/Cast/Basic.lean

tactic: simp [Int.cast_neg, negOfNat_eq]
state_before: R : Type u
inst✝ : AddGroupWithOne R
n : ℕ
⊢ ↑(negOfNat n) = -↑n
state_after: no goals
Theorem: Pi.induced_restrict_sUnion
File: Mathlib/Topology/Constructions.lean

tactic: simp_rw [Pi.induced_restrict, iInf_sUnion]
state_before: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
ι : Type u_5
π : ι → Type u_6
κ : Type u_7
inst✝ : TopologicalSpace X
T : (i : ι) → TopologicalSpace (π i)
f : X → (i : ι) → π i
𝔖 : Set (Set ι)
⊢ induced (⋃₀ 𝔖).restrict topologicalSpace = ⨅ S ∈ 𝔖, induced S.restrict topologicalSpace
state_after: no goals
Theorem: Polynomial.natDegree_list_prod_le
File: Mathlib/Algebra/Polynomial/BigOperators.lean

tactic: induction' l with hd tl IH
state_before: R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
l : List S[X]
⊢ l.prod.natDegree ≤ (List.map natDegree l).sum
state_after: case nil
R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
⊢ [].prod.natDegree ≤ (List.map natDegree []).sum

case cons
R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
hd : S[X]
tl : List S[X]
IH : tl.prod.natDegree ≤ (List.map natDegree tl).sum
⊢ (hd :: tl).prod.natDegree ≤ (List.map natDegree (hd :: tl)).sum

tactic: simp
state_before: case nil
R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
⊢ [].prod.natDegree ≤ (List.map natDegree []).sum
state_after: no goals

tactic: simpa using natDegree_mul_le.trans (add_le_add_left IH _)
state_before: case cons
R : Type u
ι : Type w
s : Finset ι
S : Type u_1
inst✝ : Semiring S
hd : S[X]
tl : List S[X]
IH : tl.prod.natDegree ≤ (List.map natDegree tl).sum
⊢ (hd :: tl).prod.natDegree ≤ (List.map natDegree (hd :: tl)).sum
state_after: no goals
Theorem: Set.Finite.fin_embedding
File: Mathlib/Data/Set/Finite.lean

tactic: simp only [Finset.coe_sort_coe, Equiv.asEmbedding_range, Finite.coe_toFinset, setOf_mem_eq]
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
h : s.Finite
⊢ range ⇑(Fintype.equivFin ↑↑h.toFinset).symm.asEmbedding = s
state_after: no goals
Theorem: PartialHomeomorph.mapsTo_extend
File: Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean

tactic: rw [mapsTo', extend_coe, extend_coe_symm, preimage_comp, ← I.image_eq, image_comp,
  f.image_eq_target_inter_inv_preimage hs]
state_before: 𝕜 : Type u_1
E : Type u_2
M : Type u_3
H : Type u_4
E' : Type u_5
M' : Type u_6
H' : Type u_7
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : TopologicalSpace H
inst✝⁴ : TopologicalSpace M
f f' : PartialHomeomorph M H
I : ModelWithCorners 𝕜 E H
inst✝³ : NormedAddCommGroup E'
inst✝² : NormedSpace 𝕜 E'
inst✝¹ : TopologicalSpace H'
inst✝ : TopologicalSpace M'
I' : ModelWithCorners 𝕜 E' H'
s t : Set M
hs : s ⊆ f.source
⊢ MapsTo (↑(f.extend I)) s (↑(f.extend I).symm ⁻¹' s ∩ range ↑I)
state_after: 𝕜 : Type u_1
E : Type u_2
M : Type u_3
H : Type u_4
E' : Type u_5
M' : Type u_6
H' : Type u_7
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : TopologicalSpace H
inst✝⁴ : TopologicalSpace M
f f' : PartialHomeomorph M H
I : ModelWithCorners 𝕜 E H
inst✝³ : NormedAddCommGroup E'
inst✝² : NormedSpace 𝕜 E'
inst✝¹ : TopologicalSpace H'
inst✝ : TopologicalSpace M'
I' : ModelWithCorners 𝕜 E' H'
s t : Set M
hs : s ⊆ f.source
⊢ ↑I '' (f.target ∩ ↑f.symm ⁻¹' s) ⊆ ↑I '' (↑f.symm ⁻¹' s)

tactic: exact image_subset _ inter_subset_right
state_before: 𝕜 : Type u_1
E : Type u_2
M : Type u_3
H : Type u_4
E' : Type u_5
M' : Type u_6
H' : Type u_7
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : TopologicalSpace H
inst✝⁴ : TopologicalSpace M
f f' : PartialHomeomorph M H
I : ModelWithCorners 𝕜 E H
inst✝³ : NormedAddCommGroup E'
inst✝² : NormedSpace 𝕜 E'
inst✝¹ : TopologicalSpace H'
inst✝ : TopologicalSpace M'
I' : ModelWithCorners 𝕜 E' H'
s t : Set M
hs : s ⊆ f.source
⊢ ↑I '' (f.target ∩ ↑f.symm ⁻¹' s) ⊆ ↑I '' (↑f.symm ⁻¹' s)
state_after: no goals
Theorem: Finset.Iio_insert
File: Mathlib/Order/Interval/Finset/Basic.lean

tactic: ext
state_before: ι : Type u_1
α : Type u_2
inst✝² : PartialOrder α
inst✝¹ : LocallyFiniteOrderBot α
inst✝ : DecidableEq α
b : α
⊢ insert b (Iio b) = Iic b
state_after: case a
ι : Type u_1
α : Type u_2
inst✝² : PartialOrder α
inst✝¹ : LocallyFiniteOrderBot α
inst✝ : DecidableEq α
b a✝ : α
⊢ a✝ ∈ insert b (Iio b) ↔ a✝ ∈ Iic b

tactic: simp_rw [Finset.mem_insert, mem_Iic, mem_Iio, le_iff_lt_or_eq, or_comm]
state_before: case a
ι : Type u_1
α : Type u_2
inst✝² : PartialOrder α
inst✝¹ : LocallyFiniteOrderBot α
inst✝ : DecidableEq α
b a✝ : α
⊢ a✝ ∈ insert b (Iio b) ↔ a✝ ∈ Iic b
state_after: no goals
Theorem: PNat.one_le_find
File: Mathlib/Data/PNat/Find.lean

tactic: simp
state_before: p q : ℕ+ → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
h : ∃ n, p n
n m : ℕ+
⊢ ¬1 < PNat.find h ↔ ¬¬p 1
state_after: no goals
Theorem: Polynomial.smeval_natCast
File: Mathlib/Algebra/Polynomial/Smeval.lean

tactic: induction' n with n ih
state_before: R : Type u_1
inst✝³ : Semiring R
p q : R[X]
S : Type u_2
inst✝² : AddCommMonoid S
inst✝¹ : Pow S ℕ
inst✝ : Module R S
x : S
n : ℕ
⊢ (↑n).smeval x = n • x ^ 0
state_after: case zero
R : Type u_1
inst✝³ : Semiring R
p q : R[X]
S : Type u_2
inst✝² : AddCommMonoid S
inst✝¹ : Pow S ℕ
inst✝ : Module R S
x : S
⊢ (↑0).smeval x = 0 • x ^ 0

case succ
R : Type u_1
inst✝³ : Semiring R
p q : R[X]
S : Type u_2
inst✝² : AddCommMonoid S
inst✝¹ : Pow S ℕ
inst✝ : Module R S
x : S
n : ℕ
ih : (↑n).smeval x = n • x ^ 0
⊢ (↑(n + 1)).smeval x = (n + 1) • x ^ 0

tactic: simp only [smeval_zero, Nat.cast_zero, Nat.zero_eq, zero_smul]
state_before: case zero
R : Type u_1
inst✝³ : Semiring R
p q : R[X]
S : Type u_2
inst✝² : AddCommMonoid S
inst✝¹ : Pow S ℕ
inst✝ : Module R S
x : S
⊢ (↑0).smeval x = 0 • x ^ 0
state_after: no goals

tactic: rw [n.cast_succ, smeval_add, ih, smeval_one, ← add_nsmul]
state_before: case succ
R : Type u_1
inst✝³ : Semiring R
p q : R[X]
S : Type u_2
inst✝² : AddCommMonoid S
inst✝¹ : Pow S ℕ
inst✝ : Module R S
x : S
n : ℕ
ih : (↑n).smeval x = n • x ^ 0
⊢ (↑(n + 1)).smeval x = (n + 1) • x ^ 0
state_after: no goals
Theorem: IsPGroup.card_orbit
File: Mathlib/GroupTheory/PGroup.lean

tactic: let ϕ := orbitEquivQuotientStabilizer G a
state_before: p : ℕ
G : Type u_1
inst✝² : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_2
inst✝¹ : MulAction G α
a : α
inst✝ : Fintype ↑(orbit G a)
⊢ ∃ n, card ↑(orbit G a) = p ^ n
state_after: p : ℕ
G : Type u_1
inst✝² : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_2
inst✝¹ : MulAction G α
a : α
inst✝ : Fintype ↑(orbit G a)
ϕ : ↑(orbit G a) ≃ G ⧸ stabilizer G a := orbitEquivQuotientStabilizer G a
⊢ ∃ n, card ↑(orbit G a) = p ^ n

tactic: haveI := Fintype.ofEquiv (orbit G a) ϕ
state_before: p : ℕ
G : Type u_1
inst✝² : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_2
inst✝¹ : MulAction G α
a : α
inst✝ : Fintype ↑(orbit G a)
ϕ : ↑(orbit G a) ≃ G ⧸ stabilizer G a := orbitEquivQuotientStabilizer G a
⊢ ∃ n, card ↑(orbit G a) = p ^ n
state_after: p : ℕ
G : Type u_1
inst✝² : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_2
inst✝¹ : MulAction G α
a : α
inst✝ : Fintype ↑(orbit G a)
ϕ : ↑(orbit G a) ≃ G ⧸ stabilizer G a := orbitEquivQuotientStabilizer G a
this : Fintype (G ⧸ stabilizer G a)
⊢ ∃ n, card ↑(orbit G a) = p ^ n

tactic: haveI := (stabilizer G a).finiteIndex_of_finite_quotient
state_before: p : ℕ
G : Type u_1
inst✝² : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_2
inst✝¹ : MulAction G α
a : α
inst✝ : Fintype ↑(orbit G a)
ϕ : ↑(orbit G a) ≃ G ⧸ stabilizer G a := orbitEquivQuotientStabilizer G a
this : Fintype (G ⧸ stabilizer G a)
⊢ ∃ n, card ↑(orbit G a) = p ^ n
state_after: p : ℕ
G : Type u_1
inst✝² : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_2
inst✝¹ : MulAction G α
a : α
inst✝ : Fintype ↑(orbit G a)
ϕ : ↑(orbit G a) ≃ G ⧸ stabilizer G a := orbitEquivQuotientStabilizer G a
this✝ : Fintype (G ⧸ stabilizer G a)
this : (stabilizer G a).FiniteIndex
⊢ ∃ n, card ↑(orbit G a) = p ^ n

tactic: rw [card_congr ϕ, ← Subgroup.index_eq_card]
state_before: p : ℕ
G : Type u_1
inst✝² : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_2
inst✝¹ : MulAction G α
a : α
inst✝ : Fintype ↑(orbit G a)
ϕ : ↑(orbit G a) ≃ G ⧸ stabilizer G a := orbitEquivQuotientStabilizer G a
this✝ : Fintype (G ⧸ stabilizer G a)
this : (stabilizer G a).FiniteIndex
⊢ ∃ n, card ↑(orbit G a) = p ^ n
state_after: p : ℕ
G : Type u_1
inst✝² : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_2
inst✝¹ : MulAction G α
a : α
inst✝ : Fintype ↑(orbit G a)
ϕ : ↑(orbit G a) ≃ G ⧸ stabilizer G a := orbitEquivQuotientStabilizer G a
this✝ : Fintype (G ⧸ stabilizer G a)
this : (stabilizer G a).FiniteIndex
⊢ ∃ n, (stabilizer G a).index = p ^ n

tactic: exact hG.index (stabilizer G a)
state_before: p : ℕ
G : Type u_1
inst✝² : Group G
hG : IsPGroup p G
hp : Fact (Nat.Prime p)
α : Type u_2
inst✝¹ : MulAction G α
a : α
inst✝ : Fintype ↑(orbit G a)
ϕ : ↑(orbit G a) ≃ G ⧸ stabilizer G a := orbitEquivQuotientStabilizer G a
this✝ : Fintype (G ⧸ stabilizer G a)
this : (stabilizer G a).FiniteIndex
⊢ ∃ n, (stabilizer G a).index = p ^ n
state_after: no goals
Theorem: Rel.edgeDensity_add_edgeDensity_compl
File: Mathlib/Combinatorics/SimpleGraph/Density.lean

tactic: rw [edgeDensity, edgeDensity, div_add_div_same, div_eq_one_iff_eq]
state_before: 𝕜 : Type u_1
ι : Type u_2
κ : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝ : (a : α) → DecidablePred (r a)
s s₁ s₂ : Finset α
t t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
hs : s.Nonempty
ht : t.Nonempty
⊢ edgeDensity r s t + edgeDensity (fun x y => ¬r x y) s t = 1
state_after: 𝕜 : Type u_1
ι : Type u_2
κ : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝ : (a : α) → DecidablePred (r a)
s s₁ s₂ : Finset α
t t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
hs : s.Nonempty
ht : t.Nonempty
⊢ ↑(interedges r s t).card + ↑(interedges (fun x y => ¬r x y) s t).card = ↑s.card * ↑t.card

𝕜 : Type u_1
ι : Type u_2
κ : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝ : (a : α) → DecidablePred (r a)
s s₁ s₂ : Finset α
t t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
hs : s.Nonempty
ht : t.Nonempty
⊢ ↑s.card * ↑t.card ≠ 0

tactic: exact mod_cast card_interedges_add_card_interedges_compl r s t
state_before: 𝕜 : Type u_1
ι : Type u_2
κ : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝ : (a : α) → DecidablePred (r a)
s s₁ s₂ : Finset α
t t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
hs : s.Nonempty
ht : t.Nonempty
⊢ ↑(interedges r s t).card + ↑(interedges (fun x y => ¬r x y) s t).card = ↑s.card * ↑t.card
state_after: no goals

tactic: exact mod_cast (mul_pos hs.card_pos ht.card_pos).ne'
state_before: 𝕜 : Type u_1
ι : Type u_2
κ : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝ : (a : α) → DecidablePred (r a)
s s₁ s₂ : Finset α
t t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
hs : s.Nonempty
ht : t.Nonempty
⊢ ↑s.card * ↑t.card ≠ 0
state_after: no goals