tasksource/leandojo huggingface dataset:
Theorem: Metric.tendsto_nhdsWithin_nhds
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: rw [← nhdsWithin_univ b, tendsto_nhdsWithin_nhdsWithin]
state_before: α : Type u
β : Type v
X : Type ?u.99263
ι : Type ?u.99266
inst✝¹ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
inst✝ : PseudoMetricSpace β
f : α → β
a : α
b : β
⊢ Tendsto f (𝓝[s] a) (𝓝 b) ↔ ∀ (ε : ℝ), ε > 0 → ∃ δ, δ > 0 ∧ ∀ {x : α}, x ∈ s → dist x a < δ → dist (f x) b < ε

tactic: simp only [mem_univ, true_and_iff]
state_before: α : Type u
β : Type v
X : Type ?u.99263
ι : Type ?u.99266
inst✝¹ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
inst✝ : PseudoMetricSpace β
f : α → β
a : α
b : β
⊢ (∀ (ε : ℝ), ε > 0 → ∃ δ, δ > 0 ∧ ∀ {x : α}, x ∈ s → dist x a < δ → f x ∈ univ ∧ dist (f x) b < ε) ↔
    ∀ (ε : ℝ), ε > 0 → ∃ δ, δ > 0 ∧ ∀ {x : α}, x ∈ s → dist x a < δ → dist (f x) b < ε
Theorem: affineSpan_eq_bot
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: rw [← not_iff_not, ← Ne.def, ← Ne.def, ← nonempty_iff_ne_bot, affineSpan_nonempty,
  nonempty_iff_ne_empty]
state_before: k : Type u_2
V : Type u_3
P : Type u_1
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type ?u.336276
s : Set P
⊢ affineSpan k s = ⊥ ↔ s = ∅
Theorem: MeasureTheory.Measure.restrict_union'
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [union_comm, restrict_union h.symm hs, add_comm]
state_before: α : Type u_1
β : Type ?u.297875
γ : Type ?u.297878
δ : Type ?u.297881
ι : Type ?u.297884
R : Type ?u.297887
R' : Type ?u.297890
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
h : Disjoint s t
hs : MeasurableSet s
⊢ restrict μ (s ∪ t) = restrict μ s + restrict μ t
Theorem: gauge_smul
File: Mathlib/Analysis/Convex/Gauge.lean

tactic: rw [← smul_eq_mul, ← gauge_smul_of_nonneg (norm_nonneg r), gauge_norm_smul hs]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.169480
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : IsROrC 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : IsScalarTower ℝ 𝕜 E
hs : Balanced 𝕜 s
r : 𝕜
x : E
⊢ gauge s (r • x) = ‖r‖ * gauge s x
Theorem: LinearMap.IsAdjointPair.sub
File: Mathlib/LinearAlgebra/SesquilinearForm.lean

tactic: rw [f.sub_apply, g.sub_apply, B'.map_sub₂, (B x).map_sub, h, h']
state_before: R : Type u_1
R₁ : Type ?u.337838
R₂ : Type ?u.337841
R₃ : Type ?u.337844
M : Type u_2
M₁ : Type u_3
M₂ : Type ?u.337853
Mₗ₁ : Type ?u.337856
Mₗ₁' : Type ?u.337859
Mₗ₂ : Type ?u.337862
Mₗ₂' : Type ?u.337865
K : Type ?u.337868
K₁ : Type ?u.337871
K₂ : Type ?u.337874
V : Type ?u.337877
V₁ : Type ?u.337880
V₂ : Type ?u.337883
n : Type ?u.337886
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup M₁
inst✝ : Module R M₁
B F : M →ₗ[R] M →ₗ[R] R
B' : M₁ →ₗ[R] M₁ →ₗ[R] R
f f' : M →ₗ[R] M₁
g g' : M₁ →ₗ[R] M
h : IsAdjointPair B B' f g
h' : IsAdjointPair B B' f' g'
x : M
x✝ : M₁
⊢ ↑(↑B' (↑(f - f') x)) x✝ = ↑(↑B x) (↑(g - g') x✝)
Theorem: OrderIso.map_iSup
File: Mathlib/Order/CompleteLattice.lean

tactic: simp only [f.le_iff_le, iSup_le_iff]
state_before: α : Type u_2
β : Type u_1
β₂ : Type ?u.79767
γ : Type ?u.79770
ι : Sort u_3
ι' : Sort ?u.79776
κ : ι → Sort ?u.79781
κ' : ι' → Sort ?u.79786
inst✝¹ : CompleteLattice α
f✝ g s t : ι → α
a b : α
inst✝ : CompleteLattice β
f : α ≃o β
x✝ : ι → α
x : α
⊢ ↑f (⨆ (i : ι), x✝ i) ≤ ↑f x ↔ (⨆ (i : ι), ↑f (x✝ i)) ≤ ↑f x
Theorem: AlgebraicGeometry.StructureSheaf.toStalk_comp_stalkToFiberRingHom
File: Mathlib/AlgebraicGeometry/StructureSheaf.lean

tactic: erw [toStalk, Category.assoc, germ_comp_stalkToFiberRingHom]
state_before: R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
⊢ toStalk R x ≫ stalkToFiberRingHom R x = algebraMap R (Localization.AtPrime x.asIdeal)

tactic: rfl
state_before: R : Type u
inst✝ : CommRing R
x : ↑(PrimeSpectrum.Top R)
⊢ toOpen R ⊤ ≫
      openToLocalization R ⊤ ↑{ val := x, property := True.intro } (_ : ↑{ val := x, property := True.intro } ∈ ⊤) =
    algebraMap R (Localization.AtPrime x.asIdeal)
Theorem: Substring.prevn_zero
File: Std/Data/String/Lemmas.lean

tactic: simp [prevn, prevn_zero s n]
state_before: s : Substring
n : Nat
⊢ prevn s (n + 1) 0 = 0
Theorem: RatFunc.eval_eq_zero_of_eval₂_denom_eq_zero
File: Mathlib/FieldTheory/RatFunc.lean

tactic: rw [eval, h, div_zero]
state_before: K : Type u
inst✝¹ : Field K
L : Type u_1
inst✝ : Field L
f : K →+* L
a : L
x : RatFunc K
h : Polynomial.eval₂ f a (denom x) = 0
⊢ eval f a x = 0
Theorem: Sym2.out_fst_mem
File: Mathlib/Data/Sym/Sym2.lean

tactic: rw [Prod.mk.eta, e.out_eq]
state_before: α : Type u_1
β : Type ?u.34339
γ : Type ?u.34342
e : Sym2 α
⊢ e = Quotient.mk (Rel.setoid α) ((Quotient.out e).fst, (Quotient.out e).snd)
Theorem: exists_floor
File: Mathlib/Algebra/Order/Archimedean.lean

tactic: haveI := Classical.propDecidable
state_before: α : Type u_1
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
⊢ ∃ fl, ∀ (z : ℤ), z ≤ fl ↔ ↑z ≤ x

tactic: have : ∃ ub : ℤ, (ub : α) ≤ x ∧ ∀ z : ℤ, (z : α) ≤ x → z ≤ ub :=
  Int.exists_greatest_of_bdd
    (let ⟨n, hn⟩ := exists_int_gt x
    ⟨n, fun z h' => Int.cast_le.1 <| le_trans h' <| le_of_lt hn⟩)
    (let ⟨n, hn⟩ := exists_int_lt x
    ⟨n, le_of_lt hn⟩)
state_before: α : Type u_1
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
this : (a : Prop) → Decidable a
⊢ ∃ fl, ∀ (z : ℤ), z ≤ fl ↔ ↑z ≤ x

tactic: refine' this.imp fun fl h z => _
state_before: α : Type u_1
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
this✝ : (a : Prop) → Decidable a
this : ∃ ub, ↑ub ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ ub
⊢ ∃ fl, ∀ (z : ℤ), z ≤ fl ↔ ↑z ≤ x

tactic: cases' h with h₁ h₂
state_before: α : Type u_1
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
this✝ : (a : Prop) → Decidable a
this : ∃ ub, ↑ub ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ ub
fl : ℤ
h : ↑fl ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ fl
z : ℤ
⊢ z ≤ fl ↔ ↑z ≤ x

tactic: exact ⟨fun h => le_trans (Int.cast_le.2 h) h₁, h₂ z⟩
state_before: case intro
α : Type u_1
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
this✝ : (a : Prop) → Decidable a
this : ∃ ub, ↑ub ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ ub
fl z : ℤ
h₁ : ↑fl ≤ x
h₂ : ∀ (z : ℤ), ↑z ≤ x → z ≤ fl
⊢ z ≤ fl ↔ ↑z ≤ x
Theorem: Int.mul_nonneg
File: Std/Data/Int/Lemmas.lean

tactic: let ⟨n, hn⟩ := eq_ofNat_of_zero_le ha
state_before: a b : Int
ha : 0 ≤ a
hb : 0 ≤ b
⊢ 0 ≤ a * b

tactic: let ⟨m, hm⟩ := eq_ofNat_of_zero_le hb
state_before: a b : Int
ha : 0 ≤ a
hb : 0 ≤ b
n : Nat
hn : a = ↑n
⊢ 0 ≤ a * b

tactic: rw [hn, hm, ← ofNat_mul]
state_before: a b : Int
ha : 0 ≤ a
hb : 0 ≤ b
n : Nat
hn : a = ↑n
m : Nat
hm : b = ↑m
⊢ 0 ≤ a * b

tactic: apply ofNat_nonneg
state_before: a b : Int
ha : 0 ≤ a
hb : 0 ≤ b
n : Nat
hn : a = ↑n
m : Nat
hm : b = ↑m
⊢ 0 ≤ ↑(n * m)
Theorem: Finset.le_sup_iff
File: Mathlib/Data/Finset/Lattice.lean

tactic: apply Iff.intro
state_before: F : Type ?u.208752
α : Type u_1
β : Type ?u.208758
γ : Type ?u.208761
ι : Type u_2
κ : Type ?u.208767
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
s : Finset ι
f : ι → α
a : α
ha : ⊥ < a
⊢ a ≤ sup s f ↔ ∃ b, b ∈ s ∧ a ≤ f b

tactic: rw [sup_cons, le_sup_iff]
state_before: case mp.cons
F : Type ?u.208752
α : Type u_1
β : Type ?u.208758
γ : Type ?u.208761
ι : Type u_2
κ : Type ?u.208767
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
s : Finset ι
f : ι → α
a : α
ha : ⊥ < a
c : ι
t : Finset ι
hc : ¬c ∈ t
ih : a ≤ sup t f → ∃ b, b ∈ t ∧ a ≤ f b
⊢ a ≤ sup (cons c t hc) f → ∃ b, b ∈ cons c t hc ∧ a ≤ f b

tactic: exact fun
| Or.inl h => ⟨c, mem_cons.2 (Or.inl rfl), h⟩
| Or.inr h => let ⟨b, hb, hle⟩ := ih h; ⟨b, mem_cons.2 (Or.inr hb), hle⟩
state_before: case mp.cons
F : Type ?u.208752
α : Type u_1
β : Type ?u.208758
γ : Type ?u.208761
ι : Type u_2
κ : Type ?u.208767
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
s : Finset ι
f : ι → α
a : α
ha : ⊥ < a
c : ι
t : Finset ι
hc : ¬c ∈ t
ih : a ≤ sup t f → ∃ b, b ∈ t ∧ a ≤ f b
⊢ a ≤ f c ∨ a ≤ sup t f → ∃ b, b ∈ cons c t hc ∧ a ≤ f b

tactic: exact fun ⟨b, hb, hle⟩ => le_trans hle (le_sup hb)
state_before: case mpr
F : Type ?u.208752
α : Type u_1
β : Type ?u.208758
γ : Type ?u.208761
ι : Type u_2
κ : Type ?u.208767
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
s : Finset ι
f : ι → α
a : α
ha : ⊥ < a
⊢ (∃ b, b ∈ s ∧ a ≤ f b) → a ≤ sup s f
Theorem: EuclideanGeometry.inter_eq_singleton_orthogonalProjectionFn
File: Mathlib/Geometry/Euclidean/Basic.lean

tactic: rw [direction_mk' p s.directionᗮ]
state_before: V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty { x // x ∈ s }
inst✝ : CompleteSpace { x // x ∈ direction s }
p : P
⊢ IsCompl (direction s) (direction (mk' p (direction s)ᗮ))

tactic: exact Submodule.isCompl_orthogonal_of_completeSpace
state_before: V : Type u_1
P : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : InnerProductSpace ℝ V
inst✝³ : MetricSpace P
inst✝² : NormedAddTorsor V P
s : AffineSubspace ℝ P
inst✝¹ : Nonempty { x // x ∈ s }
inst✝ : CompleteSpace { x // x ∈ direction s }
p : P
⊢ IsCompl (direction s) (direction s)ᗮ
Theorem: Projectivization.map_injective
File: Mathlib/LinearAlgebra/ProjectiveSpace/Basic.lean

tactic: induction' u using ind with u hu
state_before: K : Type u_1
V : Type u_3
inst✝⁶ : DivisionRing K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
L : Type u_2
W : Type u_4
inst✝³ : DivisionRing L
inst✝² : AddCommGroup W
inst✝¹ : Module L W
σ : K →+* L
τ : L →+* K
inst✝ : RingHomInvPair σ τ
f : V →ₛₗ[σ] W
hf : Function.Injective ↑f
u v : ℙ K V
h : map f hf u = map f hf v
⊢ u = v

tactic: induction' v using ind with v hv
state_before: case h
K : Type u_1
V : Type u_3
inst✝⁶ : DivisionRing K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
L : Type u_2
W : Type u_4
inst✝³ : DivisionRing L
inst✝² : AddCommGroup W
inst✝¹ : Module L W
σ : K →+* L
τ : L →+* K
inst✝ : RingHomInvPair σ τ
f : V →ₛₗ[σ] W
hf : Function.Injective ↑f
u✝ v : ℙ K V
h✝ : map f hf u✝ = map f hf v
u : V
hu : u ≠ 0
h : map f hf (mk K u hu) = map f hf v
⊢ mk K u hu = v

tactic: simp only [map_mk, mk_eq_mk_iff'] at h ⊢
state_before: case h.h
K : Type u_1
V : Type u_3
inst✝⁶ : DivisionRing K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
L : Type u_2
W : Type u_4
inst✝³ : DivisionRing L
inst✝² : AddCommGroup W
inst✝¹ : Module L W
σ : K →+* L
τ : L →+* K
inst✝ : RingHomInvPair σ τ
f : V →ₛₗ[σ] W
hf : Function.Injective ↑f
u✝ v✝ : ℙ K V
h✝² : map f hf u✝ = map f hf v✝
u : V
hu : u ≠ 0
h✝¹ : map f hf (mk K u hu) = map f hf v✝
v : V
hv : v ≠ 0
h✝ : map f hf u✝ = map f hf (mk K v hv)
h : map f hf (mk K u hu) = map f hf (mk K v hv)
⊢ mk K u hu = mk K v hv

tactic: rcases h with ⟨a, ha⟩
state_before: case h.h
K : Type u_1
V : Type u_3
inst✝⁶ : DivisionRing K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
L : Type u_2
W : Type u_4
inst✝³ : DivisionRing L
inst✝² : AddCommGroup W
inst✝¹ : Module L W
σ : K →+* L
τ : L →+* K
inst✝ : RingHomInvPair σ τ
f : V →ₛₗ[σ] W
hf : Function.Injective ↑f
u✝ v✝ : ℙ K V
h✝² : map f hf u✝ = map f hf v✝
u : V
hu : u ≠ 0
h✝¹ : map f hf (mk K u hu) = map f hf v✝
v : V
hv : v ≠ 0
h✝ : map f hf u✝ = map f hf (mk K v hv)
h : ∃ a, a • ↑f v = ↑f u
⊢ ∃ a, a • v = u

tactic: refine ⟨τ a, hf ?_⟩
state_before: case h.h.intro
K : Type u_1
V : Type u_3
inst✝⁶ : DivisionRing K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
L : Type u_2
W : Type u_4
inst✝³ : DivisionRing L
inst✝² : AddCommGroup W
inst✝¹ : Module L W
σ : K →+* L
τ : L →+* K
inst✝ : RingHomInvPair σ τ
f : V →ₛₗ[σ] W
hf : Function.Injective ↑f
u✝ v✝ : ℙ K V
h✝¹ : map f hf u✝ = map f hf v✝
u : V
hu : u ≠ 0
h✝ : map f hf (mk K u hu) = map f hf v✝
v : V
hv : v ≠ 0
h : map f hf u✝ = map f hf (mk K v hv)
a : L
ha : a • ↑f v = ↑f u
⊢ ∃ a, a • v = u

tactic: rwa [f.map_smulₛₗ, RingHomInvPair.comp_apply_eq₂]
state_before: case h.h.intro
K : Type u_1
V : Type u_3
inst✝⁶ : DivisionRing K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
L : Type u_2
W : Type u_4
inst✝³ : DivisionRing L
inst✝² : AddCommGroup W
inst✝¹ : Module L W
σ : K →+* L
τ : L →+* K
inst✝ : RingHomInvPair σ τ
f : V →ₛₗ[σ] W
hf : Function.Injective ↑f
u✝ v✝ : ℙ K V
h✝¹ : map f hf u✝ = map f hf v✝
u : V
hu : u ≠ 0
h✝ : map f hf (mk K u hu) = map f hf v✝
v : V
hv : v ≠ 0
h : map f hf u✝ = map f hf (mk K v hv)
a : L
ha : a • ↑f v = ↑f u
⊢ ↑f (↑τ a • v) = ↑f u
Theorem: MvPolynomial.esymm_eq_sum_monomial
File: Mathlib/RingTheory/MvPolynomial/Symmetric.lean

tactic: simp_rw [monomial_sum_one]
state_before: σ : Type u_1
R : Type u_2
τ : Type ?u.91991
S : Type ?u.91994
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : Fintype σ
inst✝ : Fintype τ
n : ℕ
⊢ esymm σ R n = ∑ t in powersetLen n univ, ↑(monomial (∑ i in t, Finsupp.single i 1)) 1

tactic: rfl
state_before: σ : Type u_1
R : Type u_2
τ : Type ?u.91991
S : Type ?u.91994
inst✝³ : CommSemiring R
inst✝² : CommSemiring S
inst✝¹ : Fintype σ
inst✝ : Fintype τ
n : ℕ
⊢ esymm σ R n = ∑ x in powersetLen n univ, ∏ x in x, ↑(monomial (Finsupp.single x 1)) 1
Theorem: Set.isUnit_iff
File: Mathlib/Data/Set/Pointwise/Basic.lean

tactic: constructor
state_before: F : Type ?u.88413
α : Type u_1
β : Type ?u.88419
γ : Type ?u.88422
inst✝ : DivisionMonoid α
s t : Set α
⊢ IsUnit s ↔ ∃ a, s = {a} ∧ IsUnit a

tactic: rintro ⟨u, rfl⟩
state_before: case mp
F : Type ?u.88413
α : Type u_1
β : Type ?u.88419
γ : Type ?u.88422
inst✝ : DivisionMonoid α
s t : Set α
⊢ IsUnit s → ∃ a, s = {a} ∧ IsUnit a

tactic: obtain ⟨a, b, ha, hb, h⟩ := Set.mul_eq_one_iff.1 u.mul_inv
state_before: case mp.intro
F : Type ?u.88413
α : Type u_1
β : Type ?u.88419
γ : Type ?u.88422
inst✝ : DivisionMonoid α
t : Set α
u : (Set α)ˣ
⊢ ∃ a, ↑u = {a} ∧ IsUnit a

tactic: refine' ⟨a, ha, ⟨a, b, h, singleton_injective _⟩, rfl⟩
state_before: case mp.intro.intro.intro.intro.intro
F : Type ?u.88413
α : Type u_1
β : Type ?u.88419
γ : Type ?u.88422
inst✝ : DivisionMonoid α
t : Set α
u : (Set α)ˣ
a b : α
ha : ↑u = {a}
hb : ↑u⁻¹ = {b}
h : a * b = 1
⊢ ∃ a, ↑u = {a} ∧ IsUnit a

tactic: rw [← singleton_mul_singleton, ← ha, ← hb]
state_before: case mp.intro.intro.intro.intro.intro
F : Type ?u.88413
α : Type u_1
β : Type ?u.88419
γ : Type ?u.88422
inst✝ : DivisionMonoid α
t : Set α
u : (Set α)ˣ
a b : α
ha : ↑u = {a}
hb : ↑u⁻¹ = {b}
h : a * b = 1
⊢ {b * a} = {1}

tactic: exact u.inv_mul
state_before: case mp.intro.intro.intro.intro.intro
F : Type ?u.88413
α : Type u_1
β : Type ?u.88419
γ : Type ?u.88422
inst✝ : DivisionMonoid α
t : Set α
u : (Set α)ˣ
a b : α
ha : ↑u = {a}
hb : ↑u⁻¹ = {b}
h : a * b = 1
⊢ ↑u⁻¹ * ↑u = {1}

tactic: rintro ⟨a, rfl, ha⟩
state_before: case mpr
F : Type ?u.88413
α : Type u_1
β : Type ?u.88419
γ : Type ?u.88422
inst✝ : DivisionMonoid α
s t : Set α
⊢ (∃ a, s = {a} ∧ IsUnit a) → IsUnit s

tactic: exact ha.set
state_before: case mpr.intro.intro
F : Type ?u.88413
α : Type u_1
β : Type ?u.88419
γ : Type ?u.88422
inst✝ : DivisionMonoid α
t : Set α
a : α
ha : IsUnit a
⊢ IsUnit {a}
Theorem: Finset.card_sym2
File: Mathlib/Data/Sym/Card.lean

tactic: rw [← image_diag_union_image_offDiag, card_union_eq, Sym2.card_image_diag,
  Sym2.card_image_offDiag, Nat.choose_two_right, add_comm, ← Nat.triangle_succ, Nat.succ_sub_one,
  mul_comm]
state_before: α : Type u_1
β : Type ?u.120254
inst✝ : DecidableEq α
s : Finset α
⊢ Finset.card (Finset.sym2 s) = Finset.card s * (Finset.card s + 1) / 2

tactic: rw [disjoint_left]
state_before: α : Type u_1
β : Type ?u.120254
inst✝ : DecidableEq α
s : Finset α
⊢ Disjoint (image Quotient.mk' (Finset.diag s)) (image Quotient.mk' (offDiag s))

tactic: rintro m ha hb
state_before: α : Type u_1
β : Type ?u.120254
inst✝ : DecidableEq α
s : Finset α
⊢ ∀ ⦃a : Quotient (Rel.setoid α)⦄, a ∈ image Quotient.mk' (Finset.diag s) → ¬a ∈ image Quotient.mk' (offDiag s)

tactic: rw [mem_image] at ha hb
state_before: α : Type u_1
β : Type ?u.120254
inst✝ : DecidableEq α
s : Finset α
m : Quotient (Rel.setoid α)
ha : m ∈ image Quotient.mk' (Finset.diag s)
hb : m ∈ image Quotient.mk' (offDiag s)
⊢ False

tactic: obtain ⟨⟨a, ha, rfl⟩, ⟨b, hb, hab⟩⟩ := ha, hb
state_before: α : Type u_1
β : Type ?u.120254
inst✝ : DecidableEq α
s : Finset α
m : Quotient (Rel.setoid α)
ha : ∃ a, a ∈ Finset.diag s ∧ Quotient.mk' a = m
hb : ∃ a, a ∈ offDiag s ∧ Quotient.mk' a = m
⊢ False

tactic: refine' not_isDiag_mk'_of_mem_offDiag hb _
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type ?u.120254
inst✝ : DecidableEq α
s : Finset α
a : α × α
ha : a ∈ Finset.diag s
b : α × α
hb : b ∈ offDiag s
hab : Quotient.mk' b = Quotient.mk' a
⊢ False

tactic: dsimp [Quotient.mk'] at hab
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type ?u.120254
inst✝ : DecidableEq α
s : Finset α
a : α × α
ha : a ∈ Finset.diag s
b : α × α
hb : b ∈ offDiag s
hab : Quotient.mk' b = Quotient.mk' a
⊢ IsDiag (Quotient.mk (Rel.setoid α) b)

tactic: rw [hab]
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type ?u.120254
inst✝ : DecidableEq α
s : Finset α
a : α × α
ha : a ∈ Finset.diag s
b : α × α
hb : b ∈ offDiag s
hab : Quotient.mk (Rel.setoid α) b = Quotient.mk (Rel.setoid α) a
⊢ IsDiag (Quotient.mk (Rel.setoid α) b)

tactic: exact isDiag_mk'_of_mem_diag ha
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type ?u.120254
inst✝ : DecidableEq α
s : Finset α
a : α × α
ha : a ∈ Finset.diag s
b : α × α
hb : b ∈ offDiag s
hab : Quotient.mk (Rel.setoid α) b = Quotient.mk (Rel.setoid α) a
⊢ IsDiag (Quotient.mk (Rel.setoid α) a)
Theorem: ContinuousWithinAt.prod_map
File: Mathlib/Topology/ContinuousOn.lean

tactic: unfold ContinuousWithinAt at *
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → γ
g : β → δ
s : Set α
t : Set β
x : α
y : β
hf : ContinuousWithinAt f s x
hg : ContinuousWithinAt g t y
⊢ ContinuousWithinAt (Prod.map f g) (s ×ˢ t) (x, y)

tactic: rw [nhdsWithin_prod_eq, Prod.map, nhds_prod_eq]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → γ
g : β → δ
s : Set α
t : Set β
x : α
y : β
hf : Tendsto f (𝓝[s] x) (𝓝 (f x))
hg : Tendsto g (𝓝[t] y) (𝓝 (g y))
⊢ Tendsto (Prod.map f g) (𝓝[s ×ˢ t] (x, y)) (𝓝 (Prod.map f g (x, y)))

tactic: exact hf.prod_map hg
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → γ
g : β → δ
s : Set α
t : Set β
x : α
y : β
hf : Tendsto f (𝓝[s] x) (𝓝 (f x))
hg : Tendsto g (𝓝[t] y) (𝓝 (g y))
⊢ Tendsto (Prod.map f g) (𝓝[s] x ×ˢ 𝓝[t] y) (𝓝 (f x) ×ˢ 𝓝 (g y))
Theorem: deriv_const_sub
File: Mathlib/Analysis/Calculus/Deriv/Add.lean

tactic: simp only [← derivWithin_univ,
  derivWithin_const_sub (uniqueDiffWithinAt_univ : UniqueDiffWithinAt 𝕜 _ _)]
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 : Filter 𝕜
c : F
⊢ deriv (fun y => c - f y) x = -deriv f x
Theorem: Nat.floor_div_nat
File: Mathlib/Algebra/Order/Floor.lean

tactic: cases' le_total a 0 with ha ha
state_before: F : Type ?u.94914
α : Type u_1
β : Type ?u.94920
inst✝¹ : LinearOrderedSemifield α
inst✝ : FloorSemiring α
a : α
n : ℕ
⊢ ⌊a / ↑n⌋₊ = ⌊a⌋₊ / n

tactic: obtain rfl | hn := n.eq_zero_or_pos
state_before: case inr
F : Type ?u.94914
α : Type u_1
β : Type ?u.94920
inst✝¹ : LinearOrderedSemifield α
inst✝ : FloorSemiring α
a : α
n : ℕ
ha : 0 ≤ a
⊢ ⌊a / ↑n⌋₊ = ⌊a⌋₊ / n

tactic: refine' (floor_eq_iff _).2 _
state_before: case inr.inr
F : Type ?u.94914
α : Type u_1
β : Type ?u.94920
inst✝¹ : LinearOrderedSemifield α
inst✝ : FloorSemiring α
a : α
n : ℕ
ha : 0 ≤ a
hn : n > 0
⊢ ⌊a / ↑n⌋₊ = ⌊a⌋₊ / n

tactic: constructor
state_before: case inr.inr.refine'_2
F : Type ?u.94914
α : Type u_1
β : Type ?u.94920
inst✝¹ : LinearOrderedSemifield α
inst✝ : FloorSemiring α
a : α
n : ℕ
ha : 0 ≤ a
hn : n > 0
⊢ ↑(⌊a⌋₊ / n) ≤ a / ↑n ∧ a / ↑n < ↑(⌊a⌋₊ / n) + 1

tactic: rw [div_lt_iff, add_mul, one_mul, ← cast_mul, ← cast_add, ← floor_lt ha]
state_before: case inr.inr.refine'_2.right
F : Type ?u.94914
α : Type u_1
β : Type ?u.94920
inst✝¹ : LinearOrderedSemifield α
inst✝ : FloorSemiring α
a : α
n : ℕ
ha : 0 ≤ a
hn : n > 0
⊢ a / ↑n < ↑(⌊a⌋₊ / n) + 1

tactic: rw [floor_of_nonpos, floor_of_nonpos ha]
state_before: case inl
F : Type ?u.94914
α : Type u_1
β : Type ?u.94920
inst✝¹ : LinearOrderedSemifield α
inst✝ : FloorSemiring α
a : α
n : ℕ
ha : a ≤ 0
⊢ ⌊a / ↑n⌋₊ = ⌊a⌋₊ / n

tactic: apply div_nonpos_of_nonpos_of_nonneg ha n.cast_nonneg
state_before: case inl
F : Type ?u.94914
α : Type u_1
β : Type ?u.94920
inst✝¹ : LinearOrderedSemifield α
inst✝ : FloorSemiring α
a : α
n : ℕ
ha : a ≤ 0
⊢ a / ↑n ≤ 0

tactic: simp
state_before: case inl
F : Type ?u.94914
α : Type u_1
β : Type ?u.94920
inst✝¹ : LinearOrderedSemifield α
inst✝ : FloorSemiring α
a : α
n : ℕ
ha : a ≤ 0
⊢ 0 = 0 / n

tactic: rw [cast_zero, div_zero, Nat.div_zero, floor_zero]
state_before: case inr.inl
F : Type ?u.94914
α : Type u_1
β : Type ?u.94920
inst✝¹ : LinearOrderedSemifield α
inst✝ : FloorSemiring α
a : α
ha : 0 ≤ a
⊢ ⌊a / ↑0⌋₊ = ⌊a⌋₊ / 0

tactic: exact div_nonneg ha n.cast_nonneg
state_before: case inr.inr.refine'_1
F : Type ?u.94914
α : Type u_1
β : Type ?u.94920
inst✝¹ : LinearOrderedSemifield α
inst✝ : FloorSemiring α
a : α
n : ℕ
ha : 0 ≤ a
hn : n > 0
⊢ 0 ≤ a / ↑n

tactic: exact cast_div_le.trans (div_le_div_of_le_of_nonneg (floor_le ha) n.cast_nonneg)
state_before: case inr.inr.refine'_2.left
F : Type ?u.94914
α : Type u_1
β : Type ?u.94920
inst✝¹ : LinearOrderedSemifield α
inst✝ : FloorSemiring α
a : α
n : ℕ
ha : 0 ≤ a
hn : n > 0
⊢ ↑(⌊a⌋₊ / n) ≤ a / ↑n

tactic: exact lt_div_mul_add hn
state_before: case inr.inr.refine'_2.right
F : Type ?u.94914
α : Type u_1
β : Type ?u.94920
inst✝¹ : LinearOrderedSemifield α
inst✝ : FloorSemiring α
a : α
n : ℕ
ha : 0 ≤ a
hn : n > 0
⊢ ⌊a⌋₊ < ⌊a⌋₊ / n * n + n

tactic: exact cast_pos.2 hn
state_before: case inr.inr.refine'_2.right
F : Type ?u.94914
α : Type u_1
β : Type ?u.94920
inst✝¹ : LinearOrderedSemifield α
inst✝ : FloorSemiring α
a : α
n : ℕ
ha : 0 ≤ a
hn : n > 0
⊢ 0 < ↑n
Theorem: Quaternion.norm_piLp_equiv_symm_equivTuple
File: Mathlib/Analysis/Quaternion.lean

tactic: rw [norm_eq_sqrt_real_inner, norm_eq_sqrt_real_inner, inner_self, normSq_def', PiLp.inner_apply,
  Fin.sum_univ_four]
state_before: x : ℍ
⊢ ‖↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x)‖ = ‖x‖

tactic: simp_rw [IsROrC.inner_apply, starRingEnd_apply, star_trivial, ← sq]
state_before: x : ℍ
⊢ Real.sqrt
      (inner (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 0)
              (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 0) +
            inner (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 1)
              (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 1) +
          inner (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 2)
            (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 2) +
        inner (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 3)
          (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 3)) =
    Real.sqrt (x.re ^ 2 + x.imI ^ 2 + x.imJ ^ 2 + x.imK ^ 2)

tactic: rfl
state_before: x : ℍ
⊢ Real.sqrt
      (↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 0 ^ 2 +
            ↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 1 ^ 2 +
          ↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 2 ^ 2 +
        ↑(PiLp.equiv 2 fun x => ℝ).symm (↑(equivTuple ℝ) x) 3 ^ 2) =
    Real.sqrt (x.re ^ 2 + x.imI ^ 2 + x.imJ ^ 2 + x.imK ^ 2)
Theorem: MeasureTheory.VectorMeasure.mapRange_zero
File: Mathlib/MeasureTheory/Measure/VectorMeasure.lean

tactic: ext
state_before: α : Type u_3
β : Type ?u.297551
m inst✝⁵ : MeasurableSpace α
inst✝⁴ : MeasurableSpace β
M : Type u_1
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
v : VectorMeasure α M
N : Type u_2
inst✝¹ : AddCommMonoid N
inst✝ : TopologicalSpace N
f : M →+ N
hf : Continuous ↑f
⊢ mapRange 0 f hf = 0

tactic: simp
state_before: case h
α : Type u_3
β : Type ?u.297551
m inst✝⁵ : MeasurableSpace α
inst✝⁴ : MeasurableSpace β
M : Type u_1
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
v : VectorMeasure α M
N : Type u_2
inst✝¹ : AddCommMonoid N
inst✝ : TopologicalSpace N
f : M →+ N
hf : Continuous ↑f
i✝ : Set α
a✝ : MeasurableSet i✝
⊢ ↑(mapRange 0 f hf) i✝ = ↑0 i✝