tasksource/leandojo huggingface dataset:
Theorem: AffineIsometryEquiv.linearIsometryEquiv_mk'
File: Mathlib/Analysis/NormedSpace/AffineIsometry.lean

tactic: ext
state_before: 𝕜 : Type u_1
V : Type ?u.375824
V₁ : Type u_2
V₂ : Type u_3
V₃ : Type ?u.375833
V₄ : Type ?u.375836
P₁ : Type u_5
P : Type ?u.375842
P₂ : Type u_4
P₃ : Type ?u.375848
P₄ : Type ?u.375851
inst✝²⁰ : NormedField 𝕜
inst✝¹⁹ : SeminormedAddCommGroup V
inst✝¹⁸ : SeminormedAddCommGroup V₁
inst✝¹⁷ : SeminormedAddCommGroup V₂
inst✝¹⁶ : SeminormedAddCommGroup V₃
inst✝¹⁵ : SeminormedAddCommGroup V₄
inst✝¹⁴ : NormedSpace 𝕜 V
inst✝¹³ : NormedSpace 𝕜 V₁
inst✝¹² : NormedSpace 𝕜 V₂
inst✝¹¹ : NormedSpace 𝕜 V₃
inst✝¹⁰ : NormedSpace 𝕜 V₄
inst✝⁹ : PseudoMetricSpace P
inst✝⁸ : MetricSpace P₁
inst✝⁷ : PseudoMetricSpace P₂
inst✝⁶ : PseudoMetricSpace P₃
inst✝⁵ : PseudoMetricSpace P₄
inst✝⁴ : NormedAddTorsor V P
inst✝³ : NormedAddTorsor V₁ P₁
inst✝² : NormedAddTorsor V₂ P₂
inst✝¹ : NormedAddTorsor V₃ P₃
inst✝ : NormedAddTorsor V₄ P₄
e✝ : P ≃ᵃⁱ[𝕜] P₂
e : P₁ → P₂
e' : V₁ ≃ₗᵢ[𝕜] V₂
p : P₁
h : ∀ (p' : P₁), e p' = ↑e' (p' -ᵥ p) +ᵥ e p
⊢ AffineIsometryEquiv.linearIsometryEquiv (mk' e e' p h) = e'

tactic: rfl
state_before: case h
𝕜 : Type u_1
V : Type ?u.375824
V₁ : Type u_2
V₂ : Type u_3
V₃ : Type ?u.375833
V₄ : Type ?u.375836
P₁ : Type u_5
P : Type ?u.375842
P₂ : Type u_4
P₃ : Type ?u.375848
P₄ : Type ?u.375851
inst✝²⁰ : NormedField 𝕜
inst✝¹⁹ : SeminormedAddCommGroup V
inst✝¹⁸ : SeminormedAddCommGroup V₁
inst✝¹⁷ : SeminormedAddCommGroup V₂
inst✝¹⁶ : SeminormedAddCommGroup V₃
inst✝¹⁵ : SeminormedAddCommGroup V₄
inst✝¹⁴ : NormedSpace 𝕜 V
inst✝¹³ : NormedSpace 𝕜 V₁
inst✝¹² : NormedSpace 𝕜 V₂
inst✝¹¹ : NormedSpace 𝕜 V₃
inst✝¹⁰ : NormedSpace 𝕜 V₄
inst✝⁹ : PseudoMetricSpace P
inst✝⁸ : MetricSpace P₁
inst✝⁷ : PseudoMetricSpace P₂
inst✝⁶ : PseudoMetricSpace P₃
inst✝⁵ : PseudoMetricSpace P₄
inst✝⁴ : NormedAddTorsor V P
inst✝³ : NormedAddTorsor V₁ P₁
inst✝² : NormedAddTorsor V₂ P₂
inst✝¹ : NormedAddTorsor V₃ P₃
inst✝ : NormedAddTorsor V₄ P₄
e✝ : P ≃ᵃⁱ[𝕜] P₂
e : P₁ → P₂
e' : V₁ ≃ₗᵢ[𝕜] V₂
p : P₁
h : ∀ (p' : P₁), e p' = ↑e' (p' -ᵥ p) +ᵥ e p
x✝ : V₁
⊢ ↑(AffineIsometryEquiv.linearIsometryEquiv (mk' e e' p h)) x✝ = ↑e' x✝
Theorem: Set.InjOn.pairwise_image
File: Mathlib/Data/Set/Pairwise/Basic.lean

tactic: simp (config := { contextual := true }) [h.eq_iff, Set.Pairwise]
state_before: α : Type u_2
β : Type ?u.17412
γ : Type ?u.17415
ι : Type u_1
ι' : Type ?u.17421
r p q : α → α → Prop
f g : ι → α
s✝ t u : Set α
a b : α
s : Set ι
h : InjOn f s
⊢ Set.Pairwise (f '' s) r ↔ Set.Pairwise s (r on f)
Theorem: Pi.Lex.noMaxOrder'
File: Mathlib/Data/Pi/Lex.lean

tactic: let ⟨b, hb⟩ := exists_gt (a i)
state_before: ι : Type u_1
β : ι → Type u_2
r : ι → ι → Prop
s : {i : ι} → β i → β i → Prop
inst✝² : Preorder ι
inst✝¹ : (i : ι) → LT (β i)
i : ι
inst✝ : NoMaxOrder (β i)
a : Lex ((i : ι) → β i)
⊢ ∃ b, a < b

tactic: classical
exact ⟨Function.update a i b, i, fun j hj =>
  (Function.update_noteq hj.ne b a).symm, by rwa [Function.update_same i b]⟩
state_before: ι : Type u_1
β : ι → Type u_2
r : ι → ι → Prop
s : {i : ι} → β i → β i → Prop
inst✝² : Preorder ι
inst✝¹ : (i : ι) → LT (β i)
i : ι
inst✝ : NoMaxOrder (β i)
a : Lex ((i : ι) → β i)
b : β i
hb : a i < b
⊢ ∃ b, a < b

tactic: exact ⟨Function.update a i b, i, fun j hj =>
  (Function.update_noteq hj.ne b a).symm, by rwa [Function.update_same i b]⟩
state_before: ι : Type u_1
β : ι → Type u_2
r : ι → ι → Prop
s : {i : ι} → β i → β i → Prop
inst✝² : Preorder ι
inst✝¹ : (i : ι) → LT (β i)
i : ι
inst✝ : NoMaxOrder (β i)
a : Lex ((i : ι) → β i)
b : β i
hb : a i < b
⊢ ∃ b, a < b

tactic: rwa [Function.update_same i b]
state_before: ι : Type u_1
β : ι → Type u_2
r : ι → ι → Prop
s : {i : ι} → β i → β i → Prop
inst✝² : Preorder ι
inst✝¹ : (i : ι) → LT (β i)
i : ι
inst✝ : NoMaxOrder (β i)
a : Lex ((i : ι) → β i)
b : β i
hb : a i < b
⊢ (fun x x_1 x_2 => x_1 < x_2) i (a i) (Function.update a i b i)
Theorem: Int.log_of_right_le_one
File: Mathlib/Data/Int/Log.lean

tactic: obtain rfl | hr := hr.eq_or_lt
state_before: R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
r : R
hr : r ≤ 1
⊢ log b r = -↑(Nat.clog b ⌈r⁻¹⌉₊)

tactic: rw [log, if_pos hr, inv_one, Nat.ceil_one, Nat.floor_one, Nat.log_one_right, Nat.clog_one_right,
  Int.ofNat_zero, neg_zero]
state_before: case inl
R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
hr : 1 ≤ 1
⊢ log b 1 = -↑(Nat.clog b ⌈1⁻¹⌉₊)

tactic: exact if_neg hr.not_le
state_before: case inr
R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
r : R
hr✝ : r ≤ 1
hr : r < 1
⊢ log b r = -↑(Nat.clog b ⌈r⁻¹⌉₊)
Theorem: InnerProductGeometry.angle_add_eq_arctan_of_inner_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean

tactic: rw [angle_add_eq_arcsin_of_inner_eq_zero h (Or.inl h0), Real.arctan_eq_arcsin, ←
  div_mul_eq_div_div, norm_add_eq_sqrt_iff_real_inner_eq_zero.2 h]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : inner x y = 0
h0 : x ≠ 0
⊢ angle x (x + y) = Real.arctan (‖y‖ / ‖x‖)

tactic: nth_rw 3 [← Real.sqrt_sq (norm_nonneg x)]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : inner x y = 0
h0 : x ≠ 0
⊢ Real.arcsin (‖y‖ / Real.sqrt (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖)) = Real.arcsin (‖y‖ / (‖x‖ * Real.sqrt (↑1 + (‖y‖ / ‖x‖) ^ 2)))

tactic: rw_mod_cast [← Real.sqrt_mul (sq_nonneg _), div_pow, pow_two, pow_two, mul_add, mul_one, mul_div,
  mul_comm (‖x‖ * ‖x‖), ← mul_div, div_self (mul_self_pos.2 (norm_ne_zero_iff.2 h0)).ne', mul_one]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : inner x y = 0
h0 : x ≠ 0
⊢ Real.arcsin (‖y‖ / Real.sqrt (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖)) =
    Real.arcsin (‖y‖ / (Real.sqrt (‖x‖ ^ 2) * Real.sqrt (↑1 + (‖y‖ / ‖x‖) ^ 2)))
Theorem: Nat.log_eq_zero_iff
File: Mathlib/Data/Nat/Log.lean

tactic: rw [log, dite_eq_right_iff]
state_before: b n : ℕ
⊢ log b n = 0 ↔ n < b ∨ b ≤ 1

tactic: simp only [Nat.succ_ne_zero, imp_false, not_and_or, not_le, not_lt]
state_before: b n : ℕ
⊢ (∀ (h : b ≤ n ∧ 1 < b),
      (let_fun this := (_ : n / b < n);
        log b (n / b) + 1) =
        0) ↔
    n < b ∨ b ≤ 1
Theorem: Colex.singleton_le_iff_le
File: Mathlib/Combinatorics/Colex.lean

tactic: rw [le_iff_le_iff_lt_iff_lt, singleton_lt_iff_lt]
state_before: α : Type u_1
inst✝ : LinearOrder α
r s : α
⊢ toColex {r} ≤ toColex {s} ↔ r ≤ s
Theorem: Polynomial.toFinsupp_algebraMap
File: Mathlib/Data/Polynomial/AlgebraMap.lean

tactic: rw [toFinsupp_C]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
A' : Type ?u.71594
B' : Type ?u.71597
a b : R
n : ℕ
inst✝⁴ : CommSemiring A'
inst✝³ : Semiring B'
inst✝² : CommSemiring R
p q r✝ : R[X]
inst✝¹ : Semiring A
inst✝ : Algebra R A
r : R
⊢ (↑C (↑(algebraMap R A) r)).toFinsupp = ↑(algebraMap R (AddMonoidAlgebra A ℕ)) r

tactic: rfl
state_before: R : Type u
S : Type v
T : Type w
A : Type z
A' : Type ?u.71594
B' : Type ?u.71597
a b : R
n : ℕ
inst✝⁴ : CommSemiring A'
inst✝³ : Semiring B'
inst✝² : CommSemiring R
p q r✝ : R[X]
inst✝¹ : Semiring A
inst✝ : Algebra R A
r : R
⊢ AddMonoidAlgebra.single 0 (↑(algebraMap R A) r) = ↑(algebraMap R (AddMonoidAlgebra A ℕ)) r
Theorem: LocalHomeomorph.image_open_of_open
File: Mathlib/Topology/LocalHomeomorph.lean

tactic: have : e '' s = e.target ∩ e.symm ⁻¹' s := e.toLocalEquiv.image_eq_target_inter_inv_preimage h
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.49930
δ : Type ?u.49933
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
e : LocalHomeomorph α β
e' : LocalHomeomorph β γ
s : Set α
hs : IsOpen s
h : s ⊆ e.source
⊢ IsOpen (↑e '' s)

tactic: rw [this]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.49930
δ : Type ?u.49933
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
e : LocalHomeomorph α β
e' : LocalHomeomorph β γ
s : Set α
hs : IsOpen s
h : s ⊆ e.source
this : ↑e '' s = e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' s
⊢ IsOpen (↑e '' s)

tactic: exact e.continuousOn_symm.preimage_open_of_open e.open_target hs
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.49930
δ : Type ?u.49933
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
e : LocalHomeomorph α β
e' : LocalHomeomorph β γ
s : Set α
hs : IsOpen s
h : s ⊆ e.source
this : ↑e '' s = e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' s
⊢ IsOpen (e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' s)
Theorem: Nat.card_fun
File: Mathlib/SetTheory/Cardinal/Finite.lean

tactic: haveI := Fintype.ofFinite α
state_before: α : Type u_1
β : Type u_2
inst✝ : Finite α
⊢ Nat.card (α → β) = Nat.card β ^ Nat.card α

tactic: rw [Nat.card_pi, Finset.prod_const, Finset.card_univ, ← Nat.card_eq_fintype_card]
state_before: α : Type u_1
β : Type u_2
inst✝ : Finite α
this : Fintype α
⊢ Nat.card (α → β) = Nat.card β ^ Nat.card α
Theorem: toIocDiv_add_left'
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: rw [add_comm, toIocDiv_add_right']
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIocDiv hp (p + a) b = toIocDiv hp a b - 1
Theorem: tendsto_indicator_biUnion_finset
File: Mathlib/Order/Filter/IndicatorFunction.lean

tactic: rw [iUnion_eq_iUnion_finset s]
state_before: α : Type u_3
β : Type u_2
M : Type ?u.6116
E : Type ?u.6119
ι : Type u_1
inst✝ : Zero β
s : ι → Set α
f : α → β
a : α
⊢ Tendsto (fun n => indicator (⋃ (i : ι) (_ : i ∈ n), s i) f a) atTop (pure (indicator (iUnion s) f a))

tactic: refine' Monotone.tendsto_indicator (fun n : Finset ι => ⋃ i ∈ n, s i) _ f a
state_before: α : Type u_3
β : Type u_2
M : Type ?u.6116
E : Type ?u.6119
ι : Type u_1
inst✝ : Zero β
s : ι → Set α
f : α → β
a : α
⊢ Tendsto (fun n => indicator (⋃ (i : ι) (_ : i ∈ n), s i) f a) atTop
    (pure (indicator (⋃ (t : Finset ι) (i : ι) (_ : i ∈ t), s i) f a))

tactic: exact fun t₁ t₂ => biUnion_subset_biUnion_left
state_before: α : Type u_3
β : Type u_2
M : Type ?u.6116
E : Type ?u.6119
ι : Type u_1
inst✝ : Zero β
s : ι → Set α
f : α → β
a : α
⊢ Monotone fun n => ⋃ (i : ι) (_ : i ∈ n), s i
Theorem: AnalyticOn.iterated_deriv
File: Mathlib/Analysis/Calculus/FDerivAnalytic.lean

tactic: induction' n with n IH
state_before: 𝕜 : Type u_2
inst✝⁵ : NontriviallyNormedField 𝕜
E : Type ?u.246294
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace 𝕜 E
F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace 𝕜 F
p : FormalMultilinearSeries 𝕜 𝕜 F
r : ℝ≥0∞
f : 𝕜 → F
x : 𝕜
s : Set 𝕜
inst✝ : CompleteSpace F
h : AnalyticOn 𝕜 f s
n : ℕ
⊢ AnalyticOn 𝕜 ((_root_.deriv^[n]) f) s

tactic: exact h
state_before: case zero
𝕜 : Type u_2
inst✝⁵ : NontriviallyNormedField 𝕜
E : Type ?u.246294
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace 𝕜 E
F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace 𝕜 F
p : FormalMultilinearSeries 𝕜 𝕜 F
r : ℝ≥0∞
f : 𝕜 → F
x : 𝕜
s : Set 𝕜
inst✝ : CompleteSpace F
h : AnalyticOn 𝕜 f s
⊢ AnalyticOn 𝕜 ((_root_.deriv^[Nat.zero]) f) s

tactic: simpa only [Function.iterate_succ', Function.comp_apply] using IH.deriv
state_before: case succ
𝕜 : Type u_2
inst✝⁵ : NontriviallyNormedField 𝕜
E : Type ?u.246294
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace 𝕜 E
F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace 𝕜 F
p : FormalMultilinearSeries 𝕜 𝕜 F
r : ℝ≥0∞
f : 𝕜 → F
x : 𝕜
s : Set 𝕜
inst✝ : CompleteSpace F
h : AnalyticOn 𝕜 f s
n : ℕ
IH : AnalyticOn 𝕜 ((_root_.deriv^[n]) f) s
⊢ AnalyticOn 𝕜 ((_root_.deriv^[Nat.succ n]) f) s
Theorem: RingHom.codomain_trivial_iff_map_one_eq_zero
File: Mathlib/Algebra/Hom/Ring.lean

tactic: rw [map_one, eq_comm]
state_before: F : Type ?u.85603
α : Type u_2
β : Type u_1
γ : Type ?u.85612
x✝¹ : NonAssocSemiring α
x✝ : NonAssocSemiring β
f : α →+* β
x y : α
⊢ 0 = 1 ↔ ↑f 1 = 0
Theorem: Nat.mod_mod
File: Std/Data/Nat/Lemmas.lean

tactic: simp [n0, mod_zero]
state_before: a n : Nat
n0 : n = 0
⊢ a % n % n = a % n
Theorem: Set.image2_insert_left
File: Mathlib/Data/Set/NAry.lean

tactic: rw [insert_eq, image2_union_left, image2_singleton_left]
state_before: α : Type u_2
α' : Type ?u.28327
β : Type u_3
β' : Type ?u.28333
γ : Type u_1
γ' : Type ?u.28339
δ : Type ?u.28342
δ' : Type ?u.28345
ε : Type ?u.28348
ε' : Type ?u.28351
ζ : Type ?u.28354
ζ' : Type ?u.28357
ν : Type ?u.28360
f f' : α → β → γ
g g' : α → β → γ → δ
s s' : Set α
t t' : Set β
u u' : Set γ
v : Set δ
a a' : α
b b' : β
c c' : γ
d d' : δ
⊢ image2 f (insert a s) t = (fun b => f a b) '' t ∪ image2 f s t
Theorem: uniformContinuous₂_curry
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: rw [UniformContinuous₂, uncurry_curry]
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.172235
δ' : Type ?u.172238
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : UniformSpace γ
inst✝¹ : UniformSpace δ
inst✝ : UniformSpace δ'
f : α × β → γ
⊢ UniformContinuous₂ (curry f) ↔ UniformContinuous f
Theorem: CategoryTheory.Equivalence.counit_app_functor
File: Mathlib/CategoryTheory/Equivalence.lean

tactic: erw [← Iso.hom_comp_eq_id (e.functor.mapIso (e.unitIso.app X)), functor_unit_comp]
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
e : C ≌ D
X : C
⊢ (counit e).app (e.functor.obj X) = e.functor.map ((unitInv e).app X)

tactic: rfl
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
e : C ≌ D
X : C
⊢ 𝟙 (e.functor.obj X) = 𝟙 (e.functor.obj ((𝟭 C).obj X))
Theorem: MvPowerSeries.mul_zero
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: simp [coeff_mul]
state_before: σ : Type u_1
R : Type u_2
inst✝ : Semiring R
m n✝ : σ →₀ ℕ
φ ψ : MvPowerSeries σ R
n : σ →₀ ℕ
⊢ ↑(coeff R n) (φ * 0) = ↑(coeff R n) 0
Theorem: Polynomial.degree_sub_eq_right_of_degree_lt
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: rw [← degree_neg q] at h
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Ring R
p q : R[X]
h : degree p < degree q
⊢ degree (p - q) = degree q

tactic: rw [sub_eq_add_neg, degree_add_eq_right_of_degree_lt h, degree_neg]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Ring R
p q : R[X]
h : degree p < degree (-q)
⊢ degree (p - q) = degree q
Theorem: CompactSpace.uniformContinuous_of_continuous
File: Mathlib/Topology/UniformSpace/Compact.lean

tactic: rw [nhdsSet_diagonal_eq_uniformity]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.41381
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : CompactSpace α
f : α → β
h : Continuous f
⊢ map (Prod.map f f) (𝓤 α) = map (Prod.map f f) (𝓝ˢ (diagonal α))
Theorem: Basis.constr_basis
File: Mathlib/LinearAlgebra/Basis.lean

tactic: simp [Basis.constr_apply, b.repr_self]
state_before: ι : Type u_2
ι' : Type ?u.516785
R : Type u_3
R₂ : Type ?u.516791
K : Type ?u.516794
M : Type u_4
M' : Type u_1
M'' : Type ?u.516803
V : Type u
V' : Type ?u.516808
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : Module R M
inst✝⁴ : AddCommMonoid M'
inst✝³ : Module R M'
b b₁ : Basis ι R M
i✝ : ι
c : R
x : M
S : Type u_5
inst✝² : Semiring S
inst✝¹ : Module S M'
inst✝ : SMulCommClass R S M'
f : ι → M'
i : ι
⊢ ↑(↑(constr b S) f) (↑b i) = f i
Theorem: Ultrafilter.ofComapInfPrincipal_eq_of_map
File: Mathlib/Order/Filter/Ultrafilter.lean

tactic: let f := Filter.comap m g ⊓ 𝓟 s
state_before: α : Type u
β : Type v
γ : Type ?u.55875
m : α → β
s : Set α
g : Ultrafilter β
h : m '' s ∈ g
⊢ map m (ofComapInfPrincipal h) = g

tactic: haveI : f.NeBot := comap_inf_principal_neBot_of_image_mem h
state_before: α : Type u
β : Type v
γ : Type ?u.55875
m : α → β
s : Set α
g : Ultrafilter β
h : m '' s ∈ g
f : Filter α := Filter.comap m ↑g ⊓ 𝓟 s
⊢ map m (ofComapInfPrincipal h) = g

tactic: apply eq_of_le
state_before: α : Type u
β : Type v
γ : Type ?u.55875
m : α → β
s : Set α
g : Ultrafilter β
h : m '' s ∈ g
f : Filter α := Filter.comap m ↑g ⊓ 𝓟 s
this : NeBot f
⊢ map m (ofComapInfPrincipal h) = g

tactic: calc
  Filter.map m (of f) ≤ Filter.map m f := map_mono (of_le _)
  _ ≤ (Filter.map m <| Filter.comap m g) ⊓ Filter.map m (𝓟 s) := map_inf_le
  _ = (Filter.map m <| Filter.comap m g) ⊓ (𝓟 <| m '' s) := by rw [map_principal]
  _ ≤ ↑g ⊓ (𝓟 <| m '' s) := inf_le_inf_right _ map_comap_le
  _ = ↑g := inf_of_le_left (le_principal_iff.mpr h)
state_before: case h
α : Type u
β : Type v
γ : Type ?u.55875
m : α → β
s : Set α
g : Ultrafilter β
h : m '' s ∈ g
f : Filter α := Filter.comap m ↑g ⊓ 𝓟 s
this : NeBot f
⊢ ↑(map m (ofComapInfPrincipal h)) ≤ ↑g

tactic: rw [map_principal]
state_before: α : Type u
β : Type v
γ : Type ?u.55875
m : α → β
s : Set α
g : Ultrafilter β
h : m '' s ∈ g
f : Filter α := Filter.comap m ↑g ⊓ 𝓟 s
this : NeBot f
⊢ Filter.map m (Filter.comap m ↑g) ⊓ Filter.map m (𝓟 s) = Filter.map m (Filter.comap m ↑g) ⊓ 𝓟 (m '' s)
Theorem: bddBelow_insert
File: Mathlib/Order/Bounds/Basic.lean

tactic: simp only [insert_eq, bddBelow_union, bddBelow_singleton, true_and_iff]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
s✝ t : Set α
a✝ b : α
inst✝ : SemilatticeInf γ
a : γ
s : Set γ
⊢ BddBelow (insert a s) ↔ BddBelow s
Theorem: exists_increasing_or_nonincreasing_subseq
File: Mathlib/Order/OrderIsoNat.lean

tactic: obtain ⟨g, hr | hnr⟩ := exists_increasing_or_nonincreasing_subseq' r f
state_before: α : Type u_1
r : α → α → Prop
inst✝ : IsTrans α r
f : ℕ → α
⊢ ∃ g, (∀ (m n : ℕ), m < n → r (f (↑g m)) (f (↑g n))) ∨ ∀ (m n : ℕ), m < n → ¬r (f (↑g m)) (f (↑g n))

tactic: refine' ⟨g, Or.intro_left _ fun m n mn => _⟩
state_before: case intro.inl
α : Type u_1
r : α → α → Prop
inst✝ : IsTrans α r
f : ℕ → α
g : ℕ ↪o ℕ
hr : ∀ (n : ℕ), r (f (↑g n)) (f (↑g (n + 1)))
⊢ ∃ g, (∀ (m n : ℕ), m < n → r (f (↑g m)) (f (↑g n))) ∨ ∀ (m n : ℕ), m < n → ¬r (f (↑g m)) (f (↑g n))

tactic: obtain ⟨x, rfl⟩ := exists_add_of_le (Nat.succ_le_iff.2 mn)
state_before: case intro.inl
α : Type u_1
r : α → α → Prop
inst✝ : IsTrans α r
f : ℕ → α
g : ℕ ↪o ℕ
hr : ∀ (n : ℕ), r (f (↑g n)) (f (↑g (n + 1)))
m n : ℕ
mn : m < n
⊢ r (f (↑g m)) (f (↑g n))

tactic: induction' x with x ih
state_before: case intro.inl.intro
α : Type u_1
r : α → α → Prop
inst✝ : IsTrans α r
f : ℕ → α
g : ℕ ↪o ℕ
hr : ∀ (n : ℕ), r (f (↑g n)) (f (↑g (n + 1)))
m x : ℕ
mn : m < Nat.succ m + x
⊢ r (f (↑g m)) (f (↑g (Nat.succ m + x)))

tactic: apply hr
state_before: case intro.inl.intro.zero
α : Type u_1
r : α → α → Prop
inst✝ : IsTrans α r
f : ℕ → α
g : ℕ ↪o ℕ
hr : ∀ (n : ℕ), r (f (↑g n)) (f (↑g (n + 1)))
m x : ℕ
mn✝ : m < Nat.succ m + x
mn : m < Nat.succ m + Nat.zero
⊢ r (f (↑g m)) (f (↑g (Nat.succ m + Nat.zero)))

tactic: apply IsTrans.trans _ _ _ _ (hr _)
state_before: case intro.inl.intro.succ
α : Type u_1
r : α → α → Prop
inst✝ : IsTrans α r
f : ℕ → α
g : ℕ ↪o ℕ
hr : ∀ (n : ℕ), r (f (↑g n)) (f (↑g (n + 1)))
m x✝ : ℕ
mn✝ : m < Nat.succ m + x✝
x : ℕ
ih : m < Nat.succ m + x → r (f (↑g m)) (f (↑g (Nat.succ m + x)))
mn : m < Nat.succ m + Nat.succ x
⊢ r (f (↑g m)) (f (↑g (Nat.succ m + Nat.succ x)))

tactic: exact ih (lt_of_lt_of_le m.lt_succ_self (Nat.le_add_right _ _))
state_before: α : Type u_1
r : α → α → Prop
inst✝ : IsTrans α r
f : ℕ → α
g : ℕ ↪o ℕ
hr : ∀ (n : ℕ), r (f (↑g n)) (f (↑g (n + 1)))
m x✝ : ℕ
mn✝ : m < Nat.succ m + x✝
x : ℕ
ih : m < Nat.succ m + x → r (f (↑g m)) (f (↑g (Nat.succ m + x)))
mn : m < Nat.succ m + Nat.succ x
⊢ r (f (↑g m)) (f (↑g (Nat.add (Nat.succ m) x)))

tactic: exact ⟨g, Or.intro_right _ hnr⟩
state_before: case intro.inr
α : Type u_1
r : α → α → Prop
inst✝ : IsTrans α r
f : ℕ → α
g : ℕ ↪o ℕ
hnr : ∀ (m n : ℕ), m < n → ¬r (f (↑g m)) (f (↑g n))
⊢ ∃ g, (∀ (m n : ℕ), m < n → r (f (↑g m)) (f (↑g n))) ∨ ∀ (m n : ℕ), m < n → ¬r (f (↑g m)) (f (↑g n))
Theorem: MeasureTheory.Lp.edist_toLp_toLp
File: Mathlib/MeasureTheory/Function/LpSpace.lean

tactic: rw [edist_def]
state_before: α : Type u_2
E : Type u_1
F : Type ?u.388739
G : Type ?u.388742
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f g : α → E
hf : Memℒp f p
hg : Memℒp g p
⊢ edist (Memℒp.toLp f hf) (Memℒp.toLp g hg) = snorm (f - g) p μ

tactic: exact snorm_congr_ae (hf.coeFn_toLp.sub hg.coeFn_toLp)
state_before: α : Type u_2
E : Type u_1
F : Type ?u.388739
G : Type ?u.388742
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f g : α → E
hf : Memℒp f p
hg : Memℒp g p
⊢ snorm (↑↑(Memℒp.toLp f hf) - ↑↑(Memℒp.toLp g hg)) p μ = snorm (f - g) p μ
Theorem: TopologicalSpace.Opens.mapIso_hom_app
File: Mathlib/Topology/Category/TopCat/Opens.lean

tactic: rw [h]
state_before: X Y Z : TopCat
f g : X ⟶ Y
h : f = g
U : Opens ↑Y
⊢ (map f).obj U = (map g).obj U
Theorem: Polynomial.natDegree_X_pow_le
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: nontriviality R
state_before: R✝ : Type u
S : Type v
a b c d : R✝
n✝ m : ℕ
inst✝² : Semiring R✝
inst✝¹ : Nontrivial R✝
p q : R✝[X]
R : Type u_1
inst✝ : Semiring R
n : ℕ
⊢ natDegree (X ^ n) ≤ n

tactic: rw [Polynomial.natDegree_X_pow]
state_before: R✝ : Type u
S : Type v
a b c d : R✝
n✝ m : ℕ
inst✝² : Semiring R✝
inst✝¹ : Nontrivial R✝
p q : R✝[X]
R : Type u_1
inst✝ : Semiring R
n : ℕ
✝ : Nontrivial R
⊢ natDegree (X ^ n) ≤ n
Theorem: boole_mul
File: Mathlib/Algebra/Ring/Defs.lean

tactic: simp
state_before: α✝ : Type u
β : Type v
γ : Type w
R : Type x
α : Type u_1
inst✝¹ : MulZeroOneClass α
P : Prop
inst✝ : Decidable P
a : α
⊢ (if P then 1 else 0) * a = if P then a else 0
Theorem: Finsupp.single_add
File: Mathlib/Data/Finsupp/Defs.lean

tactic: by_cases h : a = a'
state_before: α : Type u_1
β : Type ?u.287003
γ : Type ?u.287006
ι : Type ?u.287009
M : Type u_2
M' : Type ?u.287015
N : Type ?u.287018
P : Type ?u.287021
G : Type ?u.287024
H : Type ?u.287027
R : Type ?u.287030
S : Type ?u.287033
inst✝ : AddZeroClass M
a : α
b₁ b₂ : M
a' : α
⊢ ↑(single a (b₁ + b₂)) a' = ↑(single a b₁ + single a b₂) a'

tactic: rw [h, add_apply, single_eq_same, single_eq_same, single_eq_same]
state_before: case pos
α : Type u_1
β : Type ?u.287003
γ : Type ?u.287006
ι : Type ?u.287009
M : Type u_2
M' : Type ?u.287015
N : Type ?u.287018
P : Type ?u.287021
G : Type ?u.287024
H : Type ?u.287027
R : Type ?u.287030
S : Type ?u.287033
inst✝ : AddZeroClass M
a : α
b₁ b₂ : M
a' : α
h : a = a'
⊢ ↑(single a (b₁ + b₂)) a' = ↑(single a b₁ + single a b₂) a'

tactic: rw [add_apply, single_eq_of_ne h, single_eq_of_ne h, single_eq_of_ne h, zero_add]
state_before: case neg
α : Type u_1
β : Type ?u.287003
γ : Type ?u.287006
ι : Type ?u.287009
M : Type u_2
M' : Type ?u.287015
N : Type ?u.287018
P : Type ?u.287021
G : Type ?u.287024
H : Type ?u.287027
R : Type ?u.287030
S : Type ?u.287033
inst✝ : AddZeroClass M
a : α
b₁ b₂ : M
a' : α
h : ¬a = a'
⊢ ↑(single a (b₁ + b₂)) a' = ↑(single a b₁ + single a b₂) a'
Theorem: AlgebraicTopology.AlternatingCofaceMapComplex.d_squared
File: Mathlib/AlgebraicTopology/AlternatingFaceMapComplex.lean

tactic: simp only [d_eq_unop_d, ← unop_comp, AlternatingFaceMapComplex.d_squared, unop_zero]
state_before: C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
A : Type ?u.282467
inst✝¹ : Category A
inst✝ : Abelian A
X Y : CosimplicialObject C
n : ℕ
⊢ objD X n ≫ objD X (n + 1) = 0
Theorem: IsLocallyConstant.comp_continuous
File: Mathlib/Topology/LocallyConstant/Basic.lean

tactic: rw [Set.preimage_comp]
state_before: X : Type u_3
Y : Type u_1
Z : Type u_2
α : Type ?u.4420
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
g : Y → Z
f : X → Y
hg : IsLocallyConstant g
hf : Continuous f
s : Set Z
⊢ IsOpen (g ∘ f ⁻¹' s)

tactic: exact hf.isOpen_preimage _ (hg _)
state_before: X : Type u_3
Y : Type u_1
Z : Type u_2
α : Type ?u.4420
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
g : Y → Z
f : X → Y
hg : IsLocallyConstant g
hf : Continuous f
s : Set Z
⊢ IsOpen (f ⁻¹' (g ⁻¹' s))
Theorem: Ordinal.enum_le_enum
File: Mathlib/SetTheory/Ordinal/Basic.lean

tactic: rw [← @not_lt _ _ o' o, enum_lt_enum ho']
state_before: α : Type u_1
β : Type ?u.190785
γ : Type ?u.190788
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
r : α → α → Prop
inst✝ : IsWellOrder α r
o o' : Ordinal
ho : o < type r
ho' : o' < type r
⊢ ¬r (enum r o' ho') (enum r o ho) ↔ o ≤ o'