tasksource/leandojo huggingface dataset:
Theorem: Ordinal.IsNormal.le_iff_deriv
File: Mathlib/SetTheory/Ordinal/FixedPoint.lean

tactic: unfold deriv
state_before: f✝ : Ordinal → Ordinal
f : Ordinal → Ordinal
H : IsNormal f
a : Ordinal
⊢ f a ≤ a ↔ ∃ o, deriv f o = a

tactic: rw [← le_iff_derivFamily fun _ : Unit => H]
state_before: f✝ : Ordinal → Ordinal
f : Ordinal → Ordinal
H : IsNormal f
a : Ordinal
⊢ f a ≤ a ↔ ∃ o, derivFamily (fun x => f) o = a

tactic: exact ⟨fun h _ => h, fun h => h Unit.unit⟩
state_before: f✝ : Ordinal → Ordinal
f : Ordinal → Ordinal
H : IsNormal f
a : Ordinal
⊢ f a ≤ a ↔ Unit → f a ≤ a
Theorem: MeasureTheory.Integrable.toL1_coeFn
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: simp [Integrable.toL1]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.1309276
δ : Type ?u.1309279
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f : { x // x ∈ Lp β 1 }
hf : Integrable ↑↑f
⊢ toL1 (↑↑f) hf = f
Theorem: finprod_eq_mulIndicator_apply
File: Mathlib/Algebra/BigOperators/Finprod.lean

tactic: classical convert finprod_eq_if (M := M) (p := a ∈ s) (x := f a)
state_before: α : Type u_1
β : Type ?u.171403
ι : Type ?u.171406
G : Type ?u.171409
M : Type u_2
N : Type ?u.171415
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
s : Set α
f : α → M
a : α
⊢ (∏ᶠ (_ : a ∈ s), f a) = mulIndicator s f a

tactic: convert finprod_eq_if (M := M) (p := a ∈ s) (x := f a)
state_before: α : Type u_1
β : Type ?u.171403
ι : Type ?u.171406
G : Type ?u.171409
M : Type u_2
N : Type ?u.171415
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
s : Set α
f : α → M
a : α
⊢ (∏ᶠ (_ : a ∈ s), f a) = mulIndicator s f a
Theorem: CauSeq.pos_add_limZero
File: Mathlib/Data/Real/CauSeq.lean

tactic: cases' h j ij with h₁ h₂
state_before: α : Type u_1
inst✝ : LinearOrderedField α
f g : CauSeq α abs
F : α
F0 : F > 0
hF : ∃ i, ∀ (j : ℕ), j ≥ i → F ≤ ↑f j
H : LimZero g
i : ℕ
h : ∀ (j : ℕ), j ≥ i → F ≤ ↑f j ∧ abs (↑g j) < F / 2
j : ℕ
ij : j ≥ i
⊢ F / 2 ≤ ↑(f + g) j

tactic: have := add_le_add h₁ (le_of_lt (abs_lt.1 h₂).1)
state_before: case intro
α : Type u_1
inst✝ : LinearOrderedField α
f g : CauSeq α abs
F : α
F0 : F > 0
hF : ∃ i, ∀ (j : ℕ), j ≥ i → F ≤ ↑f j
H : LimZero g
i : ℕ
h : ∀ (j : ℕ), j ≥ i → F ≤ ↑f j ∧ abs (↑g j) < F / 2
j : ℕ
ij : j ≥ i
h₁ : F ≤ ↑f j
h₂ : abs (↑g j) < F / 2
⊢ F / 2 ≤ ↑(f + g) j

tactic: rwa [← sub_eq_add_neg, sub_self_div_two] at this
state_before: case intro
α : Type u_1
inst✝ : LinearOrderedField α
f g : CauSeq α abs
F : α
F0 : F > 0
hF : ∃ i, ∀ (j : ℕ), j ≥ i → F ≤ ↑f j
H : LimZero g
i : ℕ
h : ∀ (j : ℕ), j ≥ i → F ≤ ↑f j ∧ abs (↑g j) < F / 2
j : ℕ
ij : j ≥ i
h₁ : F ≤ ↑f j
h₂ : abs (↑g j) < F / 2
this : F + -(F / 2) ≤ ↑f j + ↑g j
⊢ F / 2 ≤ ↑(f + g) j
Theorem: Finpartition.energy_le_one
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Energy.lean

tactic: rw [offDiag_card, one_mul]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
s : Finset α
P : Finpartition s
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
⊢ ↑(card (offDiag P.parts)) ≤ 1 * ↑(card P.parts ^ 2)

tactic: norm_cast
state_before: α : Type u_1
inst✝¹ : DecidableEq α
s : Finset α
P : Finpartition s
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
⊢ ↑(card P.parts * card P.parts - card P.parts) ≤ ↑(card P.parts ^ 2)

tactic: rw [sq]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
s : Finset α
P : Finpartition s
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
⊢ card P.parts * card P.parts - card P.parts ≤ card P.parts ^ 2

tactic: exact tsub_le_self
state_before: α : Type u_1
inst✝¹ : DecidableEq α
s : Finset α
P : Finpartition s
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
⊢ card P.parts * card P.parts - card P.parts ≤ card P.parts * card P.parts
Theorem: Polynomial.aeval_endomorphism
File: Mathlib/Data/Polynomial/AlgebraMap.lean

tactic: rw [aeval_def, eval₂_eq_sum]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
A' : Type ?u.2133490
B' : Type ?u.2133493
a b : R
n : ℕ
inst✝⁴ : CommSemiring A'
inst✝³ : Semiring B'
M : Type u_1
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f : M →ₗ[R] M
v : M
p : R[X]
⊢ ↑(↑(aeval f) p) v = sum p fun n b => b • ↑(f ^ n) v

tactic: exact (LinearMap.applyₗ v).map_sum
state_before: R : Type u
S : Type v
T : Type w
A : Type z
A' : Type ?u.2133490
B' : Type ?u.2133493
a b : R
n : ℕ
inst✝⁴ : CommSemiring A'
inst✝³ : Semiring B'
M : Type u_1
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f : M →ₗ[R] M
v : M
p : R[X]
⊢ ↑(sum p fun e a => ↑(algebraMap R (M →ₗ[R] M)) a * f ^ e) v = sum p fun n b => b • ↑(f ^ n) v
Theorem: Submodule.map_span_le
File: Mathlib/LinearAlgebra/Span.lean

tactic: rw [f.map_span, span_le, Set.image_subset_iff]
state_before: R : Type u_1
R₂ : Type u_2
K : Type ?u.11034
M : Type u_3
M₂ : Type u_4
V : Type ?u.11043
S : Type ?u.11046
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
x : M
p p' : Submodule R M
inst✝³ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝² : AddCommMonoid M₂
inst✝¹ : Module R₂ M₂
s✝ t : Set M
inst✝ : RingHomSurjective σ₁₂
f : M →ₛₗ[σ₁₂] M₂
s : Set M
N : Submodule R₂ M₂
⊢ map f (span R s) ≤ N ↔ ∀ (m : M), m ∈ s → ↑f m ∈ N

tactic: exact Iff.rfl
state_before: R : Type u_1
R₂ : Type u_2
K : Type ?u.11034
M : Type u_3
M₂ : Type u_4
V : Type ?u.11043
S : Type ?u.11046
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
x : M
p p' : Submodule R M
inst✝³ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝² : AddCommMonoid M₂
inst✝¹ : Module R₂ M₂
s✝ t : Set M
inst✝ : RingHomSurjective σ₁₂
f : M →ₛₗ[σ₁₂] M₂
s : Set M
N : Submodule R₂ M₂
⊢ s ⊆ ↑f ⁻¹' ↑N ↔ ∀ (m : M), m ∈ s → ↑f m ∈ N
Theorem: Pmf.filter_apply_eq_zero_of_not_mem
File: Mathlib/Probability/ProbabilityMassFunction/Constructions.lean

tactic: rw [filter_apply, Set.indicator_apply_eq_zero.mpr fun ha' => absurd ha' ha, MulZeroClass.zero_mul]
state_before: α : Type u_1
β : Type ?u.162293
γ : Type ?u.162296
p : Pmf α
s : Set α
h : ∃ a, a ∈ s ∧ a ∈ support p
a : α
ha : ¬a ∈ s
⊢ ↑(filter p s h) a = 0
Theorem: Polynomial.hasStrictDerivAt_aeval
File: Mathlib/Analysis/Calculus/Deriv/Polynomial.lean

tactic: simpa only [aeval_def, eval₂_eq_eval_map, derivative_map] using
  (q.map (algebraMap R 𝕜)).hasStrictDerivAt x
state_before: 𝕜 : Type u
inst✝⁶ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
E : Type w
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x✝ : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Algebra R 𝕜
p : 𝕜[X]
q : R[X]
x : 𝕜
⊢ HasStrictDerivAt (fun x => ↑(aeval x) q) (↑(aeval x) (↑derivative q)) x
Theorem: WittVector.ghostFun_pow
File: Mathlib/RingTheory/WittVector/Basic.lean

tactic: ghost_fun_tac X 0 ^ m, ![x.coeff]
state_before: p : ℕ
R : Type u_1
S : Type ?u.815357
T : Type ?u.815360
hp : Fact (Nat.Prime p)
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : CommRing T
α : Type ?u.815375
β : Type ?u.815378
x y : 𝕎 R
m : ℕ
⊢ WittVector.ghostFun (x ^ m) = WittVector.ghostFun x ^ m
Theorem: Multiset.le_prod_nonempty_of_submultiplicative
File: Mathlib/Algebra/BigOperators/Multiset/Basic.lean

tactic: simp [h_mul]
state_before: ι : Type ?u.154312
α : Type u_1
β : Type u_2
γ : Type ?u.154321
inst✝¹ : CommMonoid α
inst✝ : OrderedCommMonoid β
f : α → β
h_mul : ∀ (a b : α), f (a * b) ≤ f a * f b
s : Multiset α
hs_nonempty : s ≠ ∅
⊢ ∀ (a b : α), (fun x => True) a → (fun x => True) b → f (a * b) ≤ f a * f b

tactic: simp
state_before: ι : Type ?u.154312
α : Type u_1
β : Type u_2
γ : Type ?u.154321
inst✝¹ : CommMonoid α
inst✝ : OrderedCommMonoid β
f : α → β
h_mul : ∀ (a b : α), f (a * b) ≤ f a * f b
s : Multiset α
hs_nonempty : s ≠ ∅
⊢ ∀ (a b : α), (fun x => True) a → (fun x => True) b → (fun x => True) (a * b)

tactic: simp
state_before: ι : Type ?u.154312
α : Type u_1
β : Type u_2
γ : Type ?u.154321
inst✝¹ : CommMonoid α
inst✝ : OrderedCommMonoid β
f : α → β
h_mul : ∀ (a b : α), f (a * b) ≤ f a * f b
s : Multiset α
hs_nonempty : s ≠ ∅
⊢ ∀ (a : α), a ∈ s → (fun x => True) a
Theorem: ContinuousLinearMap.comp_hasFPowerSeriesOnBall
File: Mathlib/Analysis/Analytic/Basic.lean

tactic: simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
  ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
  g.hasSum (h.hasSum hy)
state_before: 𝕜 : Type u_1
E : Type u_4
F : Type u_2
G : Type u_3
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g✝ : E → F
p pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r' : ℝ≥0∞
g : F →L[𝕜] G
h : HasFPowerSeriesOnBall f p x r
y✝ : E
hy : y✝ ∈ EMetric.ball 0 r
⊢ HasSum (fun n => ↑(compFormalMultilinearSeries g p n) fun x => y✝) ((↑g ∘ f) (x + y✝))
Theorem: IsUnit.smul_sub_iff_sub_inv_smul
File: Mathlib/GroupTheory/GroupAction/Group.lean

tactic: rw [← isUnit_smul_iff r (1 - r⁻¹ • a), smul_sub, smul_inv_smul]
state_before: α : Type u
β : Type v
γ : Type w
inst✝⁵ : Group α
inst✝⁴ : Monoid β
inst✝³ : AddGroup β
inst✝² : DistribMulAction α β
inst✝¹ : IsScalarTower α β β
inst✝ : SMulCommClass α β β
r : α
a : β
⊢ IsUnit (r • 1 - a) ↔ IsUnit (1 - r⁻¹ • a)
Theorem: Matrix.vandermonde_mul_vandermonde_transpose
File: Mathlib/LinearAlgebra/Vandermonde.lean

tactic: simp only [vandermonde_apply, Matrix.mul_apply, Matrix.transpose_apply, mul_pow]
state_before: R : Type u_1
inst✝ : CommRing R
n : ℕ
v w : Fin n → R
i j : Fin n
⊢ (vandermonde v ⬝ (vandermonde w)ᵀ) i j = ∑ k : Fin n, (v i * w j) ^ ↑k
Theorem: MeasureTheory.Measure.haar.prehaar_empty
File: Mathlib/MeasureTheory/Measure/Haar/Basic.lean

tactic: rw [prehaar, Compacts.coe_bot, index_empty, Nat.cast_zero, zero_div]
state_before: G : Type u_1
inst✝¹ : Group G
inst✝ : TopologicalSpace G
K₀ : PositiveCompacts G
U : Set G
⊢ prehaar (↑K₀) U ⊥ = 0
Theorem: CategoryTheory.NatIso.cancel_natIso_hom_right
File: Mathlib/CategoryTheory/NatIso.lean

tactic: simp only [cancel_mono, refl]
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
E : Type u₃
inst✝ : Category E
F G : C ⥤ D
α : F ≅ G
X : D
Y : C
f f' : X ⟶ F.obj Y
⊢ f ≫ α.hom.app Y = f' ≫ α.hom.app Y ↔ f = f'
Theorem: DirectSum.coe_decompose_mul_of_right_mem
File: Mathlib/RingTheory/GradedAlgebra/Basic.lean

tactic: lift b to 𝒜 i using b_mem
state_before: ι : Type u_1
R : Type ?u.386108
A : Type u_2
σ : Type u_3
inst✝⁹ : Semiring A
inst✝⁸ : DecidableEq ι
inst✝⁷ : CanonicallyOrderedAddMonoid ι
inst✝⁶ : SetLike σ A
inst✝⁵ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝⁴ : GradedRing 𝒜
a b : A
n✝ i : ι
inst✝³ : Sub ι
inst✝² : OrderedSub ι
inst✝¹ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
n : ι
inst✝ : Decidable (i ≤ n)
b_mem : b ∈ 𝒜 i
⊢ ↑(↑(↑(decompose 𝒜) (a * b)) n) = if i ≤ n then ↑(↑(↑(decompose 𝒜) a) (n - i)) * b else 0

tactic: rw [decompose_mul, decompose_coe, coe_mul_of_apply]
state_before: case intro
ι : Type u_1
R : Type ?u.386108
A : Type u_2
σ : Type u_3
inst✝⁹ : Semiring A
inst✝⁸ : DecidableEq ι
inst✝⁷ : CanonicallyOrderedAddMonoid ι
inst✝⁶ : SetLike σ A
inst✝⁵ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝⁴ : GradedRing 𝒜
a : A
n✝ i : ι
inst✝³ : Sub ι
inst✝² : OrderedSub ι
inst✝¹ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
n : ι
inst✝ : Decidable (i ≤ n)
b : { x // x ∈ 𝒜 i }
⊢ ↑(↑(↑(decompose 𝒜) (a * ↑b)) n) = if i ≤ n then ↑(↑(↑(decompose 𝒜) a) (n - i)) * ↑b else 0
Theorem: SetLike.coe_list_dProd
File: Mathlib/Algebra/GradedMonoid.lean

tactic: match l with
| [] =>
  rw [List.dProd_nil, coe_gOne, List.map_nil, List.prod_nil]
| head::tail =>
  rw [List.dProd_cons, coe_gMul, List.map_cons, List.prod_cons,
    SetLike.coe_list_dProd _ _ _ tail]
state_before: ι : Type u_1
R : Type u_2
α : Type u_4
S : Type u_3
inst✝³ : SetLike S R
inst✝² : Monoid R
inst✝¹ : AddMonoid ι
A : ι → S
inst✝ : GradedMonoid A
fι : α → ι
fA : (a : α) → { x // x ∈ A (fι a) }
l : List α
⊢ ↑(List.dProd l fι fA) = List.prod (List.map (fun a => ↑(fA a)) l)

tactic: rw [List.dProd_nil, coe_gOne, List.map_nil, List.prod_nil]
state_before: ι : Type u_1
R : Type u_2
α : Type u_4
S : Type u_3
inst✝³ : SetLike S R
inst✝² : Monoid R
inst✝¹ : AddMonoid ι
A : ι → S
inst✝ : GradedMonoid A
fι : α → ι
fA : (a : α) → { x // x ∈ A (fι a) }
l : List α
⊢ ↑(List.dProd [] fι fA) = List.prod (List.map (fun a => ↑(fA a)) [])

tactic: rw [List.dProd_cons, coe_gMul, List.map_cons, List.prod_cons,
  SetLike.coe_list_dProd _ _ _ tail]
state_before: ι : Type u_1
R : Type u_2
α : Type u_4
S : Type u_3
inst✝³ : SetLike S R
inst✝² : Monoid R
inst✝¹ : AddMonoid ι
A : ι → S
inst✝ : GradedMonoid A
fι : α → ι
fA : (a : α) → { x // x ∈ A (fι a) }
l : List α
head : α
tail : List α
⊢ ↑(List.dProd (head :: tail) fι fA) = List.prod (List.map (fun a => ↑(fA a)) (head :: tail))
Theorem: CategoryTheory.yonedaEquiv_naturality
File: Mathlib/CategoryTheory/Yoneda.lean

tactic: change (f.app (op X) ≫ F.map g.op) (𝟙 X) = f.app (op Y) (𝟙 Y ≫ g)
state_before: C : Type u₁
inst✝ : Category C
X Y : C
F : Cᵒᵖ ⥤ Type v₁
f : yoneda.obj X ⟶ F
g : Y ⟶ X
⊢ F.map g.op (↑yonedaEquiv f) = ↑yonedaEquiv (yoneda.map g ≫ f)

tactic: rw [← f.naturality]
state_before: C : Type u₁
inst✝ : Category C
X Y : C
F : Cᵒᵖ ⥤ Type v₁
f : yoneda.obj X ⟶ F
g : Y ⟶ X
⊢ (f.app X.op ≫ F.map g.op) (𝟙 X) = f.app Y.op (𝟙 Y ≫ g)

tactic: dsimp
state_before: C : Type u₁
inst✝ : Category C
X Y : C
F : Cᵒᵖ ⥤ Type v₁
f : yoneda.obj X ⟶ F
g : Y ⟶ X
⊢ ((yoneda.obj X).map g.op ≫ f.app Y.op) (𝟙 X) = f.app Y.op (𝟙 Y ≫ g)

tactic: simp
state_before: C : Type u₁
inst✝ : Category C
X Y : C
F : Cᵒᵖ ⥤ Type v₁
f : yoneda.obj X ⟶ F
g : Y ⟶ X
⊢ f.app Y.op (g ≫ 𝟙 X) = f.app Y.op (𝟙 Y ≫ g)
Theorem: MvPowerSeries.inv_eq_iff_mul_eq_one
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: rw [eq_comm, MvPowerSeries.eq_inv_iff_mul_eq_one h]
state_before: σ : Type u_1
R : Type ?u.1927198
k : Type u_2
inst✝ : Field k
φ ψ : MvPowerSeries σ k
h : ↑(constantCoeff σ k) ψ ≠ 0
⊢ ψ⁻¹ = φ ↔ φ * ψ = 1
Theorem: le_inv_mul_iff_mul_le
File: Mathlib/Algebra/Order/Group/Defs.lean

tactic: rw [← mul_le_mul_iff_left a]
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c d : α
⊢ b ≤ a⁻¹ * c ↔ a * b ≤ c

tactic: simp
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c d : α
⊢ a * b ≤ a * (a⁻¹ * c) ↔ a * b ≤ c
Theorem: Polynomial.le_natDegree_of_coe_le_degree
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: rwa [degree_eq_natDegree <| ne_zero_of_coe_le_degree hdeg] at hdeg
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.736582
hdeg : ↑n ≤ degree p
⊢ ↑n ≤ ↑(natDegree p)
Theorem: IsClosed.exists_nat_bool_injection_of_not_countable
File: Mathlib/Topology/Perfect.lean

tactic: letI := upgradePolishSpace α
state_before: α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
C : Set α
hC : IsClosed C
hunc : ¬Set.Countable C
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Function.Injective f

tactic: obtain ⟨D, hD, Dnonempty, hDC⟩ := exists_perfect_nonempty_of_isClosed_of_not_countable hC hunc
state_before: α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
C : Set α
hC : IsClosed C
hunc : ¬Set.Countable C
this : UpgradedPolishSpace α := upgradePolishSpace α
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Function.Injective f

tactic: obtain ⟨f, hfD, hf⟩ := hD.exists_nat_bool_injection Dnonempty
state_before: case intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
C : Set α
hC : IsClosed C
hunc : ¬Set.Countable C
this : UpgradedPolishSpace α := upgradePolishSpace α
D : Set α
hD : Perfect D
Dnonempty : Set.Nonempty D
hDC : D ⊆ C
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Function.Injective f

tactic: exact ⟨f, hfD.trans hDC, hf⟩
state_before: case intro.intro.intro.intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
C : Set α
hC : IsClosed C
hunc : ¬Set.Countable C
this : UpgradedPolishSpace α := upgradePolishSpace α
D : Set α
hD : Perfect D
Dnonempty : Set.Nonempty D
hDC : D ⊆ C
f : (ℕ → Bool) → α
hfD : range f ⊆ D
hf : Continuous f ∧ Function.Injective f
⊢ ∃ f, range f ⊆ C ∧ Continuous f ∧ Function.Injective f
Theorem: Pmf.support_uniformOfFinset
File: Mathlib/Probability/ProbabilityMassFunction/Uniform.lean

tactic: let ⟨a, ha⟩ := hs
state_before: α : Type u_1
β : Type ?u.5502
γ : Type ?u.5505
s : Finset α
hs : Finset.Nonempty s
a : α
⊢ ∀ (x : α), x ∈ support (uniformOfFinset s hs) ↔ x ∈ ↑s

tactic: simp [mem_support_iff, Finset.ne_empty_of_mem ha]
state_before: α : Type u_1
β : Type ?u.5502
γ : Type ?u.5505
s : Finset α
hs : Finset.Nonempty s
a✝ a : α
ha : a ∈ s
⊢ ∀ (x : α), x ∈ support (uniformOfFinset s (_ : ∃ x, x ∈ s)) ↔ x ∈ ↑s
Theorem: Nat.coprime_add_mul_left_left
File: Mathlib/Data/Nat/GCD/Basic.lean

tactic: rw [coprime, coprime, gcd_add_mul_left_left]
state_before: m n k : ℕ
⊢ coprime (m + n * k) n ↔ coprime m n
Theorem: Dfinsupp.subset_support_tsub
File: Mathlib/Data/Dfinsupp/Order.lean

tactic: simp (config := { contextual := true }) [subset_iff]
state_before: ι : Type u_1
α : ι → Type u_2
inst✝⁴ : (i : ι) → CanonicallyOrderedAddMonoid (α i)
inst✝³ : (i : ι) → Sub (α i)
inst✝² : ∀ (i : ι), OrderedSub (α i)
f g : Π₀ (i : ι), α i
i : ι
a b : α i
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → (x : α i) → Decidable (x ≠ 0)
⊢ support f \ support g ⊆ support (f - g)
Theorem: eventually_nhdsWithin_pos_mul_left
File: Mathlib/Topology/Algebra/Order/Field.lean

tactic: rw [← nhdsWithin_pos_comap_mul_left hx]
state_before: 𝕜 : Type u_1
α : Type ?u.57235
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
l : Filter α
f g : α → 𝕜
x : 𝕜
hx : 0 < x
p : 𝕜 → Prop
h : ∀ᶠ (ε : 𝕜) in 𝓝[Ioi 0] 0, p ε
⊢ ∀ᶠ (ε : 𝕜) in 𝓝[Ioi 0] 0, p (x * ε)

tactic: exact h.comap fun ε => x * ε
state_before: 𝕜 : Type u_1
α : Type ?u.57235
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
l : Filter α
f g : α → 𝕜
x : 𝕜
hx : 0 < x
p : 𝕜 → Prop
h : ∀ᶠ (ε : 𝕜) in 𝓝[Ioi 0] 0, p ε
⊢ ∀ᶠ (ε : 𝕜) in comap (fun x_1 => x * x_1) (𝓝[Ioi 0] 0), p (x * ε)
Theorem: Function.Periodic.const_sub
File: Mathlib/Algebra/Periodic.lean

tactic: simp only [← sub_sub, h.sub_eq]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.87566
f g : α → β
c c₁ c₂ x✝ : α
inst✝ : AddCommGroup α
h : Periodic f c
a x : α
⊢ (fun x => f (a - x)) (x + c) = (fun x => f (a - x)) x
Theorem: Function.Antiperiodic.add_const
File: Mathlib/Algebra/Periodic.lean

tactic: simpa only [add_right_comm] using h (x + a)
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.167848
f g : α → β
c c₁ c₂ x✝ : α
inst✝¹ : AddCommSemigroup α
inst✝ : Neg β
h : Antiperiodic f c
a x : α
⊢ (fun x => f (x + a)) (x + c) = -(fun x => f (x + a)) x
Theorem: Nat.Partition.ofComposition_surj
File: Mathlib/Combinatorics/Partition.lean

tactic: rintro ⟨b, hb₁, hb₂⟩
state_before: α : Type ?u.1285
n : ℕ
⊢ Function.Surjective (ofComposition n)

tactic: rcases Quotient.exists_rep b with ⟨b, rfl⟩
state_before: case mk
α : Type ?u.1285
n : ℕ
b : Multiset ℕ
hb₁ : ∀ {i : ℕ}, i ∈ b → 0 < i
hb₂ : sum b = n
⊢ ∃ a, ofComposition n a = { parts := b, parts_pos := hb₁, parts_sum := hb₂ }

tactic: refine' ⟨⟨b, fun {i} hi => hb₁ hi, _⟩, Partition.ext _ _ rfl⟩
state_before: case mk.intro
α : Type ?u.1285
n : ℕ
b : List ℕ
hb₁ : ∀ {i : ℕ}, i ∈ Quotient.mk (List.isSetoid ℕ) b → 0 < i
hb₂ : sum (Quotient.mk (List.isSetoid ℕ) b) = n
⊢ ∃ a, ofComposition n a = { parts := Quotient.mk (List.isSetoid ℕ) b, parts_pos := hb₁, parts_sum := hb₂ }

tactic: simpa using hb₂
state_before: case mk.intro
α : Type ?u.1285
n : ℕ
b : List ℕ
hb₁ : ∀ {i : ℕ}, i ∈ Quotient.mk (List.isSetoid ℕ) b → 0 < i
hb₂ : sum (Quotient.mk (List.isSetoid ℕ) b) = n
⊢ List.sum b = n
Theorem: ProbabilityTheory.condCount_inter_self
File: Mathlib/Probability/CondCount.lean

tactic: rw [condCount, cond_inter_self _ hs.measurableSet]
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hs : Set.Finite s
⊢ ↑↑(condCount s) (s ∩ t) = ↑↑(condCount s) t
Theorem: Pell.n_lt_a_pow
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: have IH := n_lt_a_pow n
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ n + 1 < a ^ (n + 1)

tactic: have : a ^ n + a ^ n ≤ a ^ n * a := by
  rw [← mul_two]
  exact Nat.mul_le_mul_left _ a1
state_before: a : ℕ
a1 : 1 < a
n : ℕ
IH : n < a ^ n
⊢ n + 1 < a ^ (n + 1)

tactic: simp [_root_.pow_succ']
state_before: a : ℕ
a1 : 1 < a
n : ℕ
IH : n < a ^ n
this : a ^ n + a ^ n ≤ a ^ n * a
⊢ n + 1 < a ^ (n + 1)

tactic: refine' lt_of_lt_of_le _ this
state_before: a : ℕ
a1 : 1 < a
n : ℕ
IH : n < a ^ n
this : a ^ n + a ^ n ≤ a ^ n * a
⊢ n + 1 < a ^ n * a

tactic: exact add_lt_add_of_lt_of_le IH (lt_of_le_of_lt (Nat.zero_le _) IH)
state_before: a : ℕ
a1 : 1 < a
n : ℕ
IH : n < a ^ n
this : a ^ n + a ^ n ≤ a ^ n * a
⊢ n + 1 < a ^ n + a ^ n

tactic: rw [← mul_two]
state_before: a : ℕ
a1 : 1 < a
n : ℕ
IH : n < a ^ n
⊢ a ^ n + a ^ n ≤ a ^ n * a

tactic: exact Nat.mul_le_mul_left _ a1
state_before: a : ℕ
a1 : 1 < a
n : ℕ
IH : n < a ^ n
⊢ a ^ n * 2 ≤ a ^ n * a
Theorem: Polynomial.monomial_pow
File: Mathlib/Data/Polynomial/Basic.lean

tactic: induction' k with k ih
state_before: R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n : ℕ
r : R
k : ℕ
⊢ ↑(monomial n) r ^ k = ↑(monomial (n * k)) (r ^ k)

tactic: simp [pow_zero, monomial_zero_one]
state_before: case zero
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n : ℕ
r : R
⊢ ↑(monomial n) r ^ Nat.zero = ↑(monomial (n * Nat.zero)) (r ^ Nat.zero)

tactic: simp [pow_succ, ih, monomial_mul_monomial, Nat.succ_eq_add_one, mul_add, add_comm]
state_before: case succ
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n : ℕ
r : R
k : ℕ
ih : ↑(monomial n) r ^ k = ↑(monomial (n * k)) (r ^ k)
⊢ ↑(monomial n) r ^ Nat.succ k = ↑(monomial (n * Nat.succ k)) (r ^ Nat.succ k)
Theorem: Computation.liftRel_pure_right
File: Mathlib/Data/Seq/Computation.lean

tactic: rw [LiftRel.swap, liftRel_pure_left]
state_before: α : Type u
β : Type v
γ : Type w
R : α → β → Prop
ca : Computation α
b : β
⊢ LiftRel R ca (pure b) ↔ ∃ a, a ∈ ca ∧ R a b
Theorem: Finset.biUnion_mono
File: Mathlib/Data/Finset/Basic.lean

tactic: have : ∀ b a, a ∈ s → b ∈ t₁ a → ∃ a : α, a ∈ s ∧ b ∈ t₂ a := fun b a ha hb =>
  ⟨a, ha, Finset.mem_of_subset (h a ha) hb⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.517176
inst✝ : DecidableEq β
s s₁ s₂ : Finset α
t t₁ t₂ : α → Finset β
h : ∀ (a : α), a ∈ s → t₁ a ⊆ t₂ a
⊢ Finset.biUnion s t₁ ⊆ Finset.biUnion s t₂

tactic: simpa only [subset_iff, mem_biUnion, exists_imp, and_imp, exists_prop]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.517176
inst✝ : DecidableEq β
s s₁ s₂ : Finset α
t t₁ t₂ : α → Finset β
h : ∀ (a : α), a ∈ s → t₁ a ⊆ t₂ a
this : ∀ (b : β) (a : α), a ∈ s → b ∈ t₁ a → ∃ a, a ∈ s ∧ b ∈ t₂ a
⊢ Finset.biUnion s t₁ ⊆ Finset.biUnion s t₂
Theorem: inv_le_iff_one_le_mul'
File: Mathlib/Algebra/Order/Group/Defs.lean

tactic: rw [mul_inv_self]
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b c d : α
⊢ a * a⁻¹ ≤ a * b ↔ 1 ≤ a * b
Theorem: Polynomial.degree_add_div
File: Mathlib/Data/Polynomial/FieldDivision.lean

tactic: have : degree (p % q) < degree (q * (p / q)) :=
  calc
    degree (p % q) < degree q := EuclideanDomain.mod_lt _ hq0
    _ ≤ _ := degree_le_mul_left _ (mt (div_eq_zero_iff hq0).1 (not_lt_of_ge hpq))
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p q : R[X]
hq0 : q ≠ 0
hpq : degree q ≤ degree p
⊢ degree q + degree (p / q) = degree p

tactic: conv_rhs =>
  rw [← EuclideanDomain.div_add_mod p q, degree_add_eq_left_of_degree_lt this, degree_mul]
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p q : R[X]
hq0 : q ≠ 0
hpq : degree q ≤ degree p
this : degree (p % q) < degree (q * (p / q))
⊢ degree q + degree (p / q) = degree p