tasksource/leandojo huggingface dataset:
Theorem: Subgroup.index_center_le_pow
File: Mathlib/GroupTheory/Index.lean

tactic: obtain ⟨S, hS1, hS2⟩ := Group.rank_spec G
state_before: G : Type u_1
inst✝² : Group G
H K L : Subgroup G
inst✝¹ : Finite ↑(commutatorSet G)
inst✝ : Group.FG G
⊢ index (center G) ≤ Nat.card ↑(commutatorSet G) ^ Group.rank G

tactic: rw [← hS1, ← Fintype.card_coe, ← Nat.card_eq_fintype_card, ← Finset.coe_sort_coe, ← Nat.card_fun]
state_before: case intro.intro
G : Type u_1
inst✝² : Group G
H K L : Subgroup G
inst✝¹ : Finite ↑(commutatorSet G)
inst✝ : Group.FG G
S : Finset G
hS1 : Finset.card S = Group.rank G
hS2 : closure ↑S = ⊤
⊢ index (center G) ≤ Nat.card ↑(commutatorSet G) ^ Group.rank G

tactic: exact Finite.card_le_of_embedding (quotientCenterEmbedding hS2)
state_before: case intro.intro
G : Type u_1
inst✝² : Group G
H K L : Subgroup G
inst✝¹ : Finite ↑(commutatorSet G)
inst✝ : Group.FG G
S : Finset G
hS1 : Finset.card S = Group.rank G
hS2 : closure ↑S = ⊤
⊢ index (center G) ≤ Nat.card (↑↑S → ↑(commutatorSet G))
Theorem: List.map_permutations'
File: Mathlib/Data/List/Permutation.lean

tactic: induction' ts with t ts ih <;> [rfl; simp [← ih, map_bind, ← map_map_permutations'Aux, bind_map]]
state_before: α : Type u_1
β : Type u_2
f : α → β
ts : List α
⊢ map (map f) (permutations' ts) = permutations' (map f ts)
Theorem: Finset.extract_gcd'
File: Mathlib/Algebra/GCDMonoid/Finset.lean

tactic: conv_lhs => rw [← normalize_gcd, ← gcd_mul_left, ← gcd_congr rfl hg]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.40816
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f✝ f g : β → α
hs : ∃ x, x ∈ s ∧ f x ≠ 0
hg : ∀ (b : β), b ∈ s → f b = gcd s f * g b
⊢ gcd s f * gcd s g = gcd s f

tactic: contrapose! hs
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.40816
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f✝ f g : β → α
hs : ∃ x, x ∈ s ∧ f x ≠ 0
hg : ∀ (b : β), b ∈ s → f b = gcd s f * g b
⊢ ¬gcd s f = 0

tactic: exact gcd_eq_zero_iff.1 hs
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.40816
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f✝ f g : β → α
hg : ∀ (b : β), b ∈ s → f b = gcd s f * g b
hs : gcd s f = 0
⊢ ∀ (x : β), x ∈ s → f x = 0
Theorem: MeasureTheory.MeasurePreserving.comp
File: Mathlib/Dynamics/Ergodic/MeasurePreserving.lean

tactic: rw [← map_map hg.1 hf.1, hf.2, hg.2]
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.54421
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
μa : Measure α
μb : Measure β
μc : Measure γ
μd : Measure δ
g : β → γ
f : α → β
hg : MeasurePreserving g
hf : MeasurePreserving f
⊢ map (g ∘ f) μa = μc
Theorem: PiTensorProduct.induction_on
File: Mathlib/LinearAlgebra/PiTensorProduct.lean

tactic: simp_rw [← tprodCoeff_eq_smul_tprod] at C1
state_before: ι : Type u_1
ι₂ : Type ?u.230665
ι₃ : Type ?u.230668
R : Type u_2
inst✝⁷ : CommSemiring R
R₁ : Type ?u.230677
R₂ : Type ?u.230680
s : ι → Type u_3
inst✝⁶ : (i : ι) → AddCommMonoid (s i)
inst✝⁵ : (i : ι) → Module R (s i)
M : Type ?u.230870
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
E : Type ?u.231004
inst✝² : AddCommMonoid E
inst✝¹ : Module R E
F : Type ?u.231138
inst✝ : AddCommMonoid F
C : (⨂[R] (i : ι), s i) → Prop
z : ⨂[R] (i : ι), s i
C1 : ∀ {r : R} {f : (i : ι) → s i}, C (r • ↑(tprod R) f)
Cp : ∀ {x y : ⨂[R] (i : ι), s i}, C x → C y → C (x + y)
⊢ C z

tactic: exact PiTensorProduct.induction_on' z @C1 @Cp
state_before: ι : Type u_1
ι₂ : Type ?u.230665
ι₃ : Type ?u.230668
R : Type u_2
inst✝⁷ : CommSemiring R
R₁ : Type ?u.230677
R₂ : Type ?u.230680
s : ι → Type u_3
inst✝⁶ : (i : ι) → AddCommMonoid (s i)
inst✝⁵ : (i : ι) → Module R (s i)
M : Type ?u.230870
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
E : Type ?u.231004
inst✝² : AddCommMonoid E
inst✝¹ : Module R E
F : Type ?u.231138
inst✝ : AddCommMonoid F
C : (⨂[R] (i : ι), s i) → Prop
z : ⨂[R] (i : ι), s i
Cp : ∀ {x y : ⨂[R] (i : ι), s i}, C x → C y → C (x + y)
C1 : ∀ {r : R} {f : (i : ι) → s i}, C (tprodCoeff R r f)
⊢ C z
Theorem: Fin.isThreeCycle_cycleRange_two
File: Mathlib/GroupTheory/Perm/Fin.lean

tactic: rw [IsThreeCycle, cycleType_cycleRange] <;> simp [Fin.eq_iff_veq]
state_before: n : ℕ
⊢ IsThreeCycle (cycleRange 2)
Theorem: LinearMap.toMatrix₂_apply
File: Mathlib/LinearAlgebra/Matrix/SesquilinearForm.lean

tactic: simp only [LinearMap.toMatrix₂, LinearEquiv.trans_apply, LinearMap.toMatrix₂'_apply,
  LinearEquiv.trans_apply, LinearMap.toMatrix₂'_apply, LinearEquiv.arrowCongr_apply,
  Basis.equivFun_symm_stdBasis, LinearEquiv.refl_apply]
state_before: R : Type u_1
R₁ : Type ?u.1290163
R₂ : Type ?u.1290166
M : Type ?u.1290169
M₁ : Type u_2
M₂ : Type u_3
M₁' : Type ?u.1290178
M₂' : Type ?u.1290181
n : Type u_4
m : Type u_5
n' : Type ?u.1290190
m' : Type ?u.1290193
ι : Type ?u.1290196
inst✝⁸ : CommRing R
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : Module R M₁
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : Module R M₂
inst✝³ : DecidableEq n
inst✝² : Fintype n
inst✝¹ : DecidableEq m
inst✝ : Fintype m
b₁ : Basis n R M₁
b₂ : Basis m R M₂
B : M₁ →ₗ[R] M₂ →ₗ[R] R
i : n
j : m
⊢ ↑(toMatrix₂ b₁ b₂) B i j = ↑(↑B (↑b₁ i)) (↑b₂ j)
Theorem: CategoryTheory.Equivalence.cancel_unit_right_assoc
File: Mathlib/CategoryTheory/Equivalence.lean

tactic: simp only [← Category.assoc, cancel_mono]
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
E : Type u₃
inst✝ : Category E
e : C ≌ D
W X X' Y : C
f : W ⟶ X
g : X ⟶ Y
f' : W ⟶ X'
g' : X' ⟶ Y
⊢ f ≫ g ≫ (unit e).app Y = f' ≫ g' ≫ (unit e).app Y ↔ f ≫ g = f' ≫ g'
Theorem: InnerProductGeometry.angle_eq_zero_iff
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

tactic: rw [angle, ← real_inner_div_norm_mul_norm_eq_one_iff, Real.arccos_eq_zero, LE.le.le_iff_eq,
  eq_comm]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
⊢ angle x y = 0 ↔ x ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • x

tactic: exact (abs_le.mp (abs_real_inner_div_norm_mul_norm_le_one x y)).2
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
⊢ inner x y / (‖x‖ * ‖y‖) ≤ 1
Theorem: MeasureTheory.toOuterMeasure_trim_eq_trim_toOuterMeasure
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [Measure.trim, toMeasure_toOuterMeasure (ms := m)]
state_before: α : Type u_1
β : Type ?u.3496438
γ : Type ?u.3496441
δ : Type ?u.3496444
ι : Type ?u.3496447
R : Type ?u.3496450
R' : Type ?u.3496453
m m0 : MeasurableSpace α
μ✝ : Measure α
s : Set α
μ : Measure α
hm : m ≤ m0
⊢ ↑(trim μ hm) = OuterMeasure.trim ↑μ
Theorem: MeasureTheory.inter_ae_eq_right_of_ae_eq_univ
File: Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean

tactic: convert ae_eq_set_inter h (ae_eq_refl t)
state_before: α : Type u_1
β : Type ?u.122594
γ : Type ?u.122597
δ : Type ?u.122600
ι : Type ?u.122603
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t : Set α
h : s =ᵐ[μ] univ
⊢ s ∩ t =ᵐ[μ] t

tactic: rw [univ_inter]
state_before: case h.e'_5
α : Type u_1
β : Type ?u.122594
γ : Type ?u.122597
δ : Type ?u.122600
ι : Type ?u.122603
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t : Set α
h : s =ᵐ[μ] univ
⊢ t = univ ∩ t
Theorem: Equiv.Perm.SameCycle.exists_pow_eq''
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: obtain ⟨_ | i, hi, rfl⟩ := h.exists_pow_eq'
state_before: ι : Type ?u.239854
α : Type u_1
β : Type ?u.239860
f g : Perm α
p : α → Prop
x y z : α
inst✝ : Finite α
h : SameCycle f x y
⊢ ∃ i x_1 x_2, ↑(f ^ i) x = y

tactic: refine' ⟨orderOf f, orderOf_pos f, le_rfl, _⟩
state_before: case intro.zero.intro
ι : Type ?u.239854
α : Type u_1
β : Type ?u.239860
f g : Perm α
p : α → Prop
x z : α
inst✝ : Finite α
hi : Nat.zero < orderOf f
h : SameCycle f x (↑(f ^ Nat.zero) x)
⊢ ∃ i x_1 x_2, ↑(f ^ i) x = ↑(f ^ Nat.zero) x

tactic: rw [pow_orderOf_eq_one, pow_zero]
state_before: case intro.zero.intro
ι : Type ?u.239854
α : Type u_1
β : Type ?u.239860
f g : Perm α
p : α → Prop
x z : α
inst✝ : Finite α
hi : Nat.zero < orderOf f
h : SameCycle f x (↑(f ^ Nat.zero) x)
⊢ ↑(f ^ orderOf f) x = ↑(f ^ Nat.zero) x

tactic: exact ⟨i.succ, i.zero_lt_succ, hi.le, by rfl⟩
state_before: case intro.succ.intro
ι : Type ?u.239854
α : Type u_1
β : Type ?u.239860
f g : Perm α
p : α → Prop
x z : α
inst✝ : Finite α
i : ℕ
hi : Nat.succ i < orderOf f
h : SameCycle f x (↑(f ^ Nat.succ i) x)
⊢ ∃ i_1 x_1 x_2, ↑(f ^ i_1) x = ↑(f ^ Nat.succ i) x

tactic: rfl
state_before: ι : Type ?u.239854
α : Type u_1
β : Type ?u.239860
f g : Perm α
p : α → Prop
x z : α
inst✝ : Finite α
i : ℕ
hi : Nat.succ i < orderOf f
h : SameCycle f x (↑(f ^ Nat.succ i) x)
⊢ ↑(f ^ Nat.succ i) x = ↑(f ^ Nat.succ i) x
Theorem: Set.ite_univ
File: Mathlib/Data/Set/Basic.lean

tactic: simp [Set.ite]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t t₁ t₂ u s s' : Set α
⊢ Set.ite univ s s' = s
Theorem: DirectSum.linearEquivFunOnFintype_lof
File: Mathlib/Algebra/DirectSum/Module.lean

tactic: ext a
state_before: R : Type u
inst✝⁶ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁵ : (i : ι) → AddCommMonoid (M i)
inst✝⁴ : (i : ι) → Module R (M i)
N : Type u₁
inst✝³ : AddCommMonoid N
inst✝² : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
m : M i
⊢ ↑(linearEquivFunOnFintype R ι M) (↑(lof R ι M i) m) = Pi.single i m

tactic: change (Dfinsupp.equivFunOnFintype (lof R ι M i m)) a = _
state_before: case h
R : Type u
inst✝⁶ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁵ : (i : ι) → AddCommMonoid (M i)
inst✝⁴ : (i : ι) → Module R (M i)
N : Type u₁
inst✝³ : AddCommMonoid N
inst✝² : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
m : M i
a : ι
⊢ ↑(linearEquivFunOnFintype R ι M) (↑(lof R ι M i) m) a = Pi.single i m a

tactic: convert _root_.congr_fun (Dfinsupp.equivFunOnFintype_single i m) a
state_before: case h
R : Type u
inst✝⁶ : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : ι → Type w
inst✝⁵ : (i : ι) → AddCommMonoid (M i)
inst✝⁴ : (i : ι) → Module R (M i)
N : Type u₁
inst✝³ : AddCommMonoid N
inst✝² : Module R N
φ : (i : ι) → M i →ₗ[R] N
ψ ψ' : (⨁ (i : ι), M i) →ₗ[R] N
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
i : ι
m : M i
a : ι
⊢ ↑Dfinsupp.equivFunOnFintype (↑(lof R ι M i) m) a = Pi.single i m a
Theorem: Quiver.reverse_inj
File: Mathlib/Combinatorics/Quiver/Symmetric.lean

tactic: constructor
state_before: U : Type ?u.753
V : Type u_1
W : Type ?u.759
inst✝² : Quiver U
inst✝¹ : Quiver V
inst✝ : Quiver W
h : HasInvolutiveReverse V
a b : V
f g : a ⟶ b
⊢ reverse f = reverse g ↔ f = g

tactic: rintro h
state_before: case mp
U : Type ?u.753
V : Type u_1
W : Type ?u.759
inst✝² : Quiver U
inst✝¹ : Quiver V
inst✝ : Quiver W
h : HasInvolutiveReverse V
a b : V
f g : a ⟶ b
⊢ reverse f = reverse g → f = g

tactic: simpa using congr_arg Quiver.reverse h
state_before: case mp
U : Type ?u.753
V : Type u_1
W : Type ?u.759
inst✝² : Quiver U
inst✝¹ : Quiver V
inst✝ : Quiver W
h✝ : HasInvolutiveReverse V
a b : V
f g : a ⟶ b
h : reverse f = reverse g
⊢ f = g

tactic: rintro h
state_before: case mpr
U : Type ?u.753
V : Type u_1
W : Type ?u.759
inst✝² : Quiver U
inst✝¹ : Quiver V
inst✝ : Quiver W
h : HasInvolutiveReverse V
a b : V
f g : a ⟶ b
⊢ f = g → reverse f = reverse g

tactic: congr
state_before: case mpr
U : Type ?u.753
V : Type u_1
W : Type ?u.759
inst✝² : Quiver U
inst✝¹ : Quiver V
inst✝ : Quiver W
h✝ : HasInvolutiveReverse V
a b : V
f g : a ⟶ b
h : f = g
⊢ reverse f = reverse g
Theorem: three_add_one_eq_four
File: Mathlib/Data/Nat/Cast/Defs.lean

tactic: rw [←two_add_one_eq_three, ←one_add_one_eq_two, ←Nat.cast_one,
  ←Nat.cast_add, ←Nat.cast_add, ←Nat.cast_add]
state_before: α : Type u_1
inst✝ : AddMonoidWithOne α
⊢ 3 + 1 = 4

tactic: apply congrArg
state_before: α : Type u_1
inst✝ : AddMonoidWithOne α
⊢ ↑(1 + 1 + 1 + 1) = 4

tactic: decide
state_before: case h
α : Type u_1
inst✝ : AddMonoidWithOne α
⊢ 1 + 1 + 1 + 1 = 4
Theorem: Complex.cosh_sq
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← cosh_sq_sub_sinh_sq x]
state_before: x y : ℂ
⊢ cosh x ^ 2 = sinh x ^ 2 + 1

tactic: ring
state_before: x y : ℂ
⊢ cosh x ^ 2 = sinh x ^ 2 + (cosh x ^ 2 - sinh x ^ 2)
Theorem: Polynomial.eval₂_X_pow
File: Mathlib/Data/Polynomial/Eval.lean

tactic: rw [X_pow_eq_monomial]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
f : R →+* S
x : S
n : ℕ
⊢ eval₂ f x (X ^ n) = x ^ n

tactic: convert eval₂_monomial f x (n := n) (r := 1)
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
f : R →+* S
x : S
n : ℕ
⊢ eval₂ f x (↑(monomial n) 1) = x ^ n

tactic: simp
state_before: case h.e'_3
R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
f : R →+* S
x : S
n : ℕ
⊢ x ^ n = ↑f 1 * x ^ n
Theorem: Nat.dist_eq_intro
File: Mathlib/Data/Nat/Dist.lean

tactic: rw [dist_add_add_right]
state_before: n m k l : ℕ
h : n + m = k + l
⊢ dist n k = dist (n + m) (k + m)

tactic: rw [h]
state_before: n m k l : ℕ
h : n + m = k + l
⊢ dist (n + m) (k + m) = dist (k + l) (k + m)

tactic: rw [dist_add_add_left]
state_before: n m k l : ℕ
h : n + m = k + l
⊢ dist (k + l) (k + m) = dist l m
Theorem: Array.size_map
File: Std/Data/Array/Init/Lemmas.lean

tactic: simp [size]
state_before: α : Type u_1
β : Type u_2
f : α → β
arr : Array α
⊢ size (map f arr) = size arr
Theorem: innerDualCone_eq_iInter_innerDualCone_singleton
File: Mathlib/Analysis/Convex/Cone/Dual.lean

tactic: rw [← ConvexCone.coe_iInf, ← innerDualCone_iUnion, iUnion_of_singleton_coe]
state_before: 𝕜 : Type ?u.19025
E : Type ?u.19028
F : Type ?u.19031
G : Type ?u.19034
H : Type u_1
inst✝¹ : NormedAddCommGroup H
inst✝ : InnerProductSpace ℝ H
s t : Set H
⊢ ↑(innerDualCone s) = ⋂ (i : ↑s), ↑(innerDualCone {↑i})
Theorem: Polynomial.aeval_eq_zero_of_dvd_aeval_eq_zero
File: Mathlib/Data/Polynomial/AlgebraMap.lean

tactic: rw [aeval_def, ← eval_map] at h₂⊢
state_before: R : Type u
S : Type v
T : Type w
A : Type z
A' : Type ?u.1237620
B' : Type ?u.1237623
a✝ b : R
n : ℕ
inst✝⁹ : CommSemiring A'
inst✝⁸ : Semiring B'
inst✝⁷ : CommSemiring R
p✝ q✝ : R[X]
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
B : Type ?u.1237836
inst✝⁴ : Semiring B
inst✝³ : Algebra R B
x : A
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
inst✝ : Algebra S T
p q : S[X]
h₁ : p ∣ q
a : T
h₂ : ↑(aeval a) p = 0
⊢ ↑(aeval a) q = 0

tactic: exact eval_eq_zero_of_dvd_of_eval_eq_zero (Polynomial.map_dvd (algebraMap S T) h₁) h₂
state_before: R : Type u
S : Type v
T : Type w
A : Type z
A' : Type ?u.1237620
B' : Type ?u.1237623
a✝ b : R
n : ℕ
inst✝⁹ : CommSemiring A'
inst✝⁸ : Semiring B'
inst✝⁷ : CommSemiring R
p✝ q✝ : R[X]
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
B : Type ?u.1237836
inst✝⁴ : Semiring B
inst✝³ : Algebra R B
x : A
inst✝² : CommSemiring S
inst✝¹ : CommSemiring T
inst✝ : Algebra S T
p q : S[X]
h₁ : p ∣ q
a : T
h₂ : eval a (map (algebraMap S T) p) = 0
⊢ eval a (map (algebraMap S T) q) = 0
Theorem: Set.Finite.induction_on'
File: Mathlib/Data/Set/Finite.lean

tactic: refine' @Set.Finite.induction_on α (fun s => s ⊆ S → C s) S h (fun _ => H0) _ Subset.rfl
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
C : Set α → Prop
S : Set α
h : Set.Finite S
H0 : C ∅
H1 : ∀ {a : α} {s : Set α}, a ∈ S → s ⊆ S → ¬a ∈ s → C s → C (insert a s)
⊢ C S

tactic: intro a s has _ hCs haS
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
C : Set α → Prop
S : Set α
h : Set.Finite S
H0 : C ∅
H1 : ∀ {a : α} {s : Set α}, a ∈ S → s ⊆ S → ¬a ∈ s → C s → C (insert a s)
⊢ ∀ {a : α} {s : Set α}, ¬a ∈ s → Set.Finite s → (fun s => s ⊆ S → C s) s → (fun s => s ⊆ S → C s) (insert a s)

tactic: rw [insert_subset] at haS
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
C : Set α → Prop
S : Set α
h : Set.Finite S
H0 : C ∅
H1 : ∀ {a : α} {s : Set α}, a ∈ S → s ⊆ S → ¬a ∈ s → C s → C (insert a s)
a : α
s : Set α
has : ¬a ∈ s
a✝ : Set.Finite s
hCs : s ⊆ S → C s
haS : insert a s ⊆ S
⊢ C (insert a s)

tactic: exact H1 haS.1 haS.2 has (hCs haS.2)
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
C : Set α → Prop
S : Set α
h : Set.Finite S
H0 : C ∅
H1 : ∀ {a : α} {s : Set α}, a ∈ S → s ⊆ S → ¬a ∈ s → C s → C (insert a s)
a : α
s : Set α
has : ¬a ∈ s
a✝ : Set.Finite s
hCs : s ⊆ S → C s
haS : a ∈ S ∧ s ⊆ S
⊢ C (insert a s)
Theorem: Real.toNNReal_sum_of_nonneg
File: Mathlib/Data/Real/NNReal.lean

tactic: rw [← NNReal.coe_eq, NNReal.coe_sum, Real.coe_toNNReal _ (Finset.sum_nonneg hf)]
state_before: α : Type u_1
s : Finset α
f : α → ℝ
hf : ∀ (a : α), a ∈ s → 0 ≤ f a
⊢ Real.toNNReal (∑ a in s, f a) = ∑ a in s, Real.toNNReal (f a)

tactic: exact Finset.sum_congr rfl fun x hxs => by rw [Real.coe_toNNReal _ (hf x hxs)]
state_before: α : Type u_1
s : Finset α
f : α → ℝ
hf : ∀ (a : α), a ∈ s → 0 ≤ f a
⊢ ∑ i in s, f i = ∑ a in s, ↑(Real.toNNReal (f a))

tactic: rw [Real.coe_toNNReal _ (hf x hxs)]
state_before: α : Type u_1
s : Finset α
f : α → ℝ
hf : ∀ (a : α), a ∈ s → 0 ≤ f a
x : α
hxs : x ∈ s
⊢ f x = ↑(Real.toNNReal (f x))
Theorem: Function.mulSupport_prod
File: Mathlib/Algebra/Support.lean

tactic: rw [mulSupport_subset_iff']
state_before: α : Type u_2
β : Type u_3
A : Type ?u.99397
B : Type ?u.99400
M : Type u_1
N : Type ?u.99406
P : Type ?u.99409
R : Type ?u.99412
S : Type ?u.99415
G : Type ?u.99418
M₀ : Type ?u.99421
G₀ : Type ?u.99424
ι : Sort ?u.99427
inst✝ : CommMonoid M
s : Finset α
f : α → β → M
⊢ (mulSupport fun x => ∏ i in s, f i x) ⊆ ⋃ (i : α) (_ : i ∈ s), mulSupport (f i)

tactic: simp only [mem_iUnion, not_exists, nmem_mulSupport]
state_before: α : Type u_2
β : Type u_3
A : Type ?u.99397
B : Type ?u.99400
M : Type u_1
N : Type ?u.99406
P : Type ?u.99409
R : Type ?u.99412
S : Type ?u.99415
G : Type ?u.99418
M₀ : Type ?u.99421
G₀ : Type ?u.99424
ι : Sort ?u.99427
inst✝ : CommMonoid M
s : Finset α
f : α → β → M
⊢ ∀ (x : β), (¬x ∈ ⋃ (i : α) (_ : i ∈ s), mulSupport (f i)) → ∏ i in s, f i x = 1

tactic: exact fun x => Finset.prod_eq_one
state_before: α : Type u_2
β : Type u_3
A : Type ?u.99397
B : Type ?u.99400
M : Type u_1
N : Type ?u.99406
P : Type ?u.99409
R : Type ?u.99412
S : Type ?u.99415
G : Type ?u.99418
M₀ : Type ?u.99421
G₀ : Type ?u.99424
ι : Sort ?u.99427
inst✝ : CommMonoid M
s : Finset α
f : α → β → M
⊢ ∀ (x : β), (∀ (x_1 : α), x_1 ∈ s → f x_1 x = 1) → ∏ i in s, f i x = 1
Theorem: WittVector.IsPoly.map
File: Mathlib/RingTheory/WittVector/IsPoly.lean

tactic: obtain ⟨φ, hf⟩ := hf
state_before: p : ℕ
R S : Type u
σ : Type ?u.696707
idx : Type ?u.696710
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R
hf : IsPoly p f
g : R →+* S
x : 𝕎 R
⊢ ↑(WittVector.map g) (f x) = f (↑(WittVector.map g) x)

tactic: ext n
state_before: case mk'.intro
p : ℕ
R S : Type u
σ : Type ?u.696707
idx : Type ?u.696710
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R
g : R →+* S
x : 𝕎 R
φ : ℕ → MvPolynomial ℕ ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x : 𝕎 R), (f x).coeff = fun n => ↑(aeval x.coeff) (φ n)
⊢ ↑(WittVector.map g) (f x) = f (↑(WittVector.map g) x)

tactic: simp only [map_coeff, hf, map_aeval]
state_before: case mk'.intro.h
p : ℕ
R S : Type u
σ : Type ?u.696707
idx : Type ?u.696710
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R
g : R →+* S
x : 𝕎 R
φ : ℕ → MvPolynomial ℕ ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x : 𝕎 R), (f x).coeff = fun n => ↑(aeval x.coeff) (φ n)
n : ℕ
⊢ coeff (↑(WittVector.map g) (f x)) n = coeff (f (↑(WittVector.map g) x)) n

tactic: apply eval₂Hom_congr (RingHom.ext_int _ _) _ rfl
state_before: case mk'.intro.h
p : ℕ
R S : Type u
σ : Type ?u.696707
idx : Type ?u.696710
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R
g : R →+* S
x : 𝕎 R
φ : ℕ → MvPolynomial ℕ ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x : 𝕎 R), (f x).coeff = fun n => ↑(aeval x.coeff) (φ n)
n : ℕ
⊢ ↑(eval₂Hom (RingHom.comp g (algebraMap ℤ R)) fun i => ↑g (coeff x i)) (φ n) =
    ↑(aeval (↑(WittVector.map g) x).coeff) (φ n)

tactic: ext
state_before: p : ℕ
R S : Type u
σ : Type ?u.696707
idx : Type ?u.696710
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R
g : R →+* S
x : 𝕎 R
φ : ℕ → MvPolynomial ℕ ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x : 𝕎 R), (f x).coeff = fun n => ↑(aeval x.coeff) (φ n)
n : ℕ
⊢ (fun i => ↑g (coeff x i)) = (↑(WittVector.map g) x).coeff

tactic: simp only [map_coeff]
state_before: case h
p : ℕ
R S : Type u
σ : Type ?u.696707
idx : Type ?u.696710
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Fact (Nat.Prime p)
f : ⦃R : Type u⦄ → [inst : CommRing R] → 𝕎 R → 𝕎 R
g : R →+* S
x : 𝕎 R
φ : ℕ → MvPolynomial ℕ ℤ
hf : ∀ ⦃R : Type u⦄ [inst : CommRing R] (x : 𝕎 R), (f x).coeff = fun n => ↑(aeval x.coeff) (φ n)
n x✝ : ℕ
⊢ ↑g (coeff x x✝) = coeff (↑(WittVector.map g) x) x✝
Theorem: Multiset.Nat.map_swap_antidiagonal
File: Mathlib/Data/Multiset/NatAntidiagonal.lean

tactic: rw [antidiagonal, coe_map, List.Nat.map_swap_antidiagonal, coe_reverse]
state_before: n : ℕ
⊢ map Prod.swap (antidiagonal n) = antidiagonal n
Theorem: Function.Injective.noZeroSMulDivisors
File: Mathlib/Algebra/Module/Basic.lean

tactic: rw [← hs, h, h0]
state_before: α : Type ?u.261935
R✝ : Type ?u.261938
k : Type ?u.261941
S : Type ?u.261944
M✝ : Type ?u.261947
M₂ : Type ?u.261950
M₃ : Type ?u.261953
ι : Type ?u.261956
R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁵ : Zero R
inst✝⁴ : Zero M
inst✝³ : Zero N
inst✝² : SMul R M
inst✝¹ : SMul R N
inst✝ : NoZeroSMulDivisors R N
f : M → N
hf : Injective f
h0 : f 0 = 0
hs : ∀ (c : R) (x : M), f (c • x) = c • f x
x✝¹ : R
x✝ : M
h : x✝¹ • x✝ = 0
⊢ x✝¹ • f x✝ = 0
Theorem: EuclideanGeometry.Sphere.wbtw_secondInter
File: Mathlib/Geometry/Euclidean/Sphere/SecondInter.lean

tactic: by_cases h : p' = p
state_before: V : Type u_2
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
s : Sphere P
p p' : P
hp : p ∈ s
hp' : dist p' s.center ≤ s.radius
⊢ Wbtw ℝ p p' (secondInter s p (p' -ᵥ p))

tactic: refine'
  wbtw_of_collinear_of_dist_center_le_radius (s.secondInter_collinear p p') hp hp'
    ((Sphere.secondInter_mem _).2 hp) _
state_before: case neg
V : Type u_2
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
s : Sphere P
p p' : P
hp : p ∈ s
hp' : dist p' s.center ≤ s.radius
h : ¬p' = p
⊢ Wbtw ℝ p p' (secondInter s p (p' -ᵥ p))

tactic: intro he
state_before: case neg
V : Type u_2
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
s : Sphere P
p p' : P
hp : p ∈ s
hp' : dist p' s.center ≤ s.radius
h : ¬p' = p
⊢ p ≠ secondInter s p (p' -ᵥ p)

tactic: rw [eq_comm, Sphere.secondInter_eq_self_iff, ← neg_neg (p' -ᵥ p), inner_neg_left,
  neg_vsub_eq_vsub_rev, neg_eq_zero, eq_comm] at he
state_before: case neg
V : Type u_2
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
s : Sphere P
p p' : P
hp : p ∈ s
hp' : dist p' s.center ≤ s.radius
h : ¬p' = p
he : p = secondInter s p (p' -ᵥ p)
⊢ False

tactic: exact ((inner_pos_or_eq_of_dist_le_radius hp hp').resolve_right (Ne.symm h)).ne he
state_before: case neg
V : Type u_2
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
s : Sphere P
p p' : P
hp : p ∈ s
hp' : dist p' s.center ≤ s.radius
h : ¬p' = p
he : 0 = inner (p -ᵥ p') (p -ᵥ s.center)
⊢ False

tactic: simp [h]
state_before: case pos
V : Type u_2
P : Type u_1
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
s : Sphere P
p p' : P
hp : p ∈ s
hp' : dist p' s.center ≤ s.radius
h : p' = p
⊢ Wbtw ℝ p p' (secondInter s p (p' -ᵥ p))