tasksource/leandojo huggingface dataset:
Theorem: Ordinal.sSup_ord
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rw [csSup_le_iff'
    (bddAbove_iff_small.2 (@small_image _ _ _ s (Cardinal.bddAbove_iff_small.1 hs))),
  ord_le, csSup_le_iff' hs]
state_before: α : Type ?u.298606
β : Type ?u.298609
γ : Type ?u.298612
r : α → α → Prop
s✝ : β → β → Prop
t : γ → γ → Prop
s : Set Cardinal
hs : BddAbove s
a : Ordinal
⊢ ord (sSup s) ≤ a ↔ sSup (ord '' s) ≤ a

tactic: simp [ord_le]
state_before: α : Type ?u.298606
β : Type ?u.298609
γ : Type ?u.298612
r : α → α → Prop
s✝ : β → β → Prop
t : γ → γ → Prop
s : Set Cardinal
hs : BddAbove s
a : Ordinal
⊢ (∀ (x : Cardinal), x ∈ s → x ≤ card a) ↔ ∀ (x : Ordinal), x ∈ ord '' s → x ≤ a
Theorem: dist_triangle_right
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: rw [dist_comm y]
state_before: α : Type u
β : Type v
X : Type ?u.9917
ι : Type ?u.9920
inst✝ : PseudoMetricSpace α
x y z : α
⊢ dist x y ≤ dist x z + dist y z

tactic: apply dist_triangle
state_before: α : Type u
β : Type v
X : Type ?u.9917
ι : Type ?u.9920
inst✝ : PseudoMetricSpace α
x y z : α
⊢ dist x y ≤ dist x z + dist z y
Theorem: inner_zero_left
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: rw [← zero_smul 𝕜 (0 : E), inner_smul_left, RingHom.map_zero, MulZeroClass.zero_mul]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.1517880
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x : E
⊢ inner 0 x = 0
Theorem: SimpleGraph.deleteEdges_univ_eq
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

tactic: ext
state_before: ι : Sort ?u.156524
𝕜 : Type ?u.156527
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e : Sym2 V
⊢ deleteEdges G Set.univ = ⊥

tactic: simp
state_before: case Adj.h.h.a
ι : Sort ?u.156524
𝕜 : Type ?u.156527
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e : Sym2 V
x✝¹ x✝ : V
⊢ Adj (deleteEdges G Set.univ) x✝¹ x✝ ↔ Adj ⊥ x✝¹ x✝
Theorem: minpoly.subsingleton
File: Mathlib/FieldTheory/Minpoly/Basic.lean

tactic: nontriviality A
state_before: A : Type u_2
B : Type u_1
B' : Type ?u.53832
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Subsingleton B
⊢ minpoly A x = 1

tactic: have := minpoly.min A x monic_one (Subsingleton.elim _ _)
state_before: A : Type u_2
B : Type u_1
B' : Type ?u.53832
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Subsingleton B
✝ : Nontrivial A
⊢ minpoly A x = 1

tactic: rw [degree_one] at this
state_before: A : Type u_2
B : Type u_1
B' : Type ?u.53832
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Subsingleton B
✝ : Nontrivial A
this : degree (minpoly A x) ≤ degree 1
⊢ minpoly A x = 1

tactic: cases' le_or_lt (minpoly A x).degree 0 with h h
state_before: A : Type u_2
B : Type u_1
B' : Type ?u.53832
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Subsingleton B
✝ : Nontrivial A
this : degree (minpoly A x) ≤ 0
⊢ minpoly A x = 1

tactic: rwa [(monic ⟨1, monic_one, by simp⟩ : (minpoly A x).Monic).degree_le_zero_iff_eq_one] at h
state_before: case inl
A : Type u_2
B : Type u_1
B' : Type ?u.53832
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Subsingleton B
✝ : Nontrivial A
this : degree (minpoly A x) ≤ 0
h : degree (minpoly A x) ≤ 0
⊢ minpoly A x = 1

tactic: simp
state_before: A : Type u_2
B : Type u_1
B' : Type ?u.53832
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Subsingleton B
✝ : Nontrivial A
this : degree (minpoly A x) ≤ 0
h : degree (minpoly A x) ≤ 0
⊢ eval₂ (algebraMap A B) x 1 = 0

tactic: exact (this.not_lt h).elim
state_before: case inr
A : Type u_2
B : Type u_1
B' : Type ?u.53832
inst✝⁵ : CommRing A
inst✝⁴ : Ring B
inst✝³ : Ring B'
inst✝² : Algebra A B
inst✝¹ : Algebra A B'
x : B
inst✝ : Subsingleton B
✝ : Nontrivial A
this : degree (minpoly A x) ≤ 0
h : 0 < degree (minpoly A x)
⊢ minpoly A x = 1
Theorem: Filter.one_le_div_iff
File: Mathlib/Order/Filter/Pointwise.lean

tactic: refine' ⟨fun h hfg => _, _⟩
state_before: F : Type ?u.310838
α : Type u_1
β : Type ?u.310844
γ : Type ?u.310847
δ : Type ?u.310850
ε : Type ?u.310853
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
m : F
f g f₁ g₁ : Filter α
f₂ g₂ : Filter β
⊢ 1 ≤ f / g ↔ ¬Disjoint f g

tactic: obtain ⟨s, hs, t, ht, hst⟩ := hfg.le_bot (mem_bot : ∅ ∈ ⊥)
state_before: case refine'_1
F : Type ?u.310838
α : Type u_1
β : Type ?u.310844
γ : Type ?u.310847
δ : Type ?u.310850
ε : Type ?u.310853
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
m : F
f g f₁ g₁ : Filter α
f₂ g₂ : Filter β
h : 1 ≤ f / g
hfg : Disjoint f g
⊢ False

tactic: exact Set.one_mem_div_iff.1 (h <| div_mem_div hs ht) (disjoint_iff.2 hst.symm)
state_before: case refine'_1.intro.intro.intro.intro
F : Type ?u.310838
α : Type u_1
β : Type ?u.310844
γ : Type ?u.310847
δ : Type ?u.310850
ε : Type ?u.310853
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
m : F
f g f₁ g₁ : Filter α
f₂ g₂ : Filter β
h : 1 ≤ f / g
hfg : Disjoint f g
s : Set α
hs : s ∈ f
t : Set α
ht : t ∈ g
hst : ∅ = s ∩ t
⊢ False

tactic: rintro h s ⟨t₁, t₂, h₁, h₂, hs⟩
state_before: case refine'_2
F : Type ?u.310838
α : Type u_1
β : Type ?u.310844
γ : Type ?u.310847
δ : Type ?u.310850
ε : Type ?u.310853
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
m : F
f g f₁ g₁ : Filter α
f₂ g₂ : Filter β
⊢ ¬Disjoint f g → 1 ≤ f / g

tactic: exact hs (Set.one_mem_div_iff.2 fun ht => h <| disjoint_of_disjoint_of_mem ht h₁ h₂)
state_before: case refine'_2.intro.intro.intro.intro
F : Type ?u.310838
α : Type u_1
β : Type ?u.310844
γ : Type ?u.310847
δ : Type ?u.310850
ε : Type ?u.310853
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
m : F
f g f₁ g₁ : Filter α
f₂ g₂ : Filter β
h : ¬Disjoint f g
s t₁ t₂ : Set α
h₁ : t₁ ∈ f
h₂ : t₂ ∈ g
hs : t₁ / t₂ ⊆ s
⊢ s ∈ 1
Theorem: sq_pos_of_pos
File: Mathlib/Algebra/GroupPower/Order.lean

tactic: rw [sq]
state_before: β : Type ?u.233772
A : Type ?u.233775
G : Type ?u.233778
M : Type ?u.233781
R : Type u_1
inst✝ : StrictOrderedSemiring R
a x y : R
n m : ℕ
ha : 0 < a
⊢ 0 < a ^ 2

tactic: exact mul_pos ha ha
state_before: β : Type ?u.233772
A : Type ?u.233775
G : Type ?u.233778
M : Type ?u.233781
R : Type u_1
inst✝ : StrictOrderedSemiring R
a x y : R
n m : ℕ
ha : 0 < a
⊢ 0 < a * a
Theorem: cross_anticomm'
File: Mathlib/LinearAlgebra/CrossProduct.lean

tactic: rw [add_eq_zero_iff_eq_neg, cross_anticomm]
state_before: R : Type u_1
inst✝ : CommRing R
v w : Fin 3 → R
⊢ ↑(↑crossProduct v) w + ↑(↑crossProduct w) v = 0
Theorem: lie_neg
File: Mathlib/Algebra/Lie/Basic.lean

tactic: rw [← sub_eq_zero, sub_neg_eq_add, ← lie_add]
state_before: R : Type u
L : Type v
M : Type w
N : Type w₁
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
t : R
x y z : L
m n : M
⊢ ⁅x, -m⁆ = -⁅x, m⁆

tactic: simp
state_before: R : Type u
L : Type v
M : Type w
N : Type w₁
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
t : R
x y z : L
m n : M
⊢ ⁅x, -m + m⁆ = 0
Theorem: Associates.le_mul_left
File: Mathlib/Algebra/Associated.lean

tactic: rw [mul_comm]
state_before: α : Type u_1
β : Type ?u.300647
γ : Type ?u.300650
δ : Type ?u.300653
inst✝ : CommMonoid α
a b : Associates α
⊢ a ≤ b * a

tactic: exact le_mul_right
state_before: α : Type u_1
β : Type ?u.300647
γ : Type ?u.300650
δ : Type ?u.300653
inst✝ : CommMonoid α
a b : Associates α
⊢ a ≤ a * b
Theorem: Set.EqOn.piecewise_ite'
File: Mathlib/Data/Set/Function.lean

tactic: simp [eqOn_piecewise, *]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.88049
ι : Sort ?u.88052
π : α → Type ?u.88057
δ : α → Sort ?u.88062
s : Set α
f✝ g✝ : (i : α) → δ i
inst✝ : (j : α) → Decidable (j ∈ s)
f f' g : α → β
t t' : Set α
h : EqOn f g (t ∩ s)
h' : EqOn f' g (t' ∩ sᶜ)
⊢ EqOn (piecewise s f f') g (Set.ite s t t')
Theorem: dvd_mul_gcd_of_dvd_mul
File: Mathlib/Algebra/GCDMonoid/Basic.lean

tactic: rw [mul_comm] at H⊢
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
m n k : α
H : k ∣ m * n
⊢ k ∣ m * gcd k n

tactic: exact dvd_gcd_mul_of_dvd_mul H
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
m n k : α
H : k ∣ n * m
⊢ k ∣ gcd k n * m
Theorem: CategoryTheory.Limits.Cone.w
File: Mathlib/CategoryTheory/Limits/Cones.lean

tactic: rw [← c.π.naturality f]
state_before: J : Type u₁
inst✝³ : Category J
K : Type u₂
inst✝² : Category K
C : Type u₃
inst✝¹ : Category C
D : Type u₄
inst✝ : Category D
F : J ⥤ C
c : Cone F
j j' : J
f : j ⟶ j'
⊢ c.π.app j ≫ F.map f = c.π.app j'

tactic: apply id_comp
state_before: J : Type u₁
inst✝³ : Category J
K : Type u₂
inst✝² : Category K
C : Type u₃
inst✝¹ : Category C
D : Type u₄
inst✝ : Category D
F : J ⥤ C
c : Cone F
j j' : J
f : j ⟶ j'
⊢ ((const J).obj c.pt).map f ≫ c.π.app j' = c.π.app j'
Theorem: IsIdempotentElem.iff_eq_zero_or_one
File: Mathlib/Algebra/Ring/Idempotents.lean

tactic: refine'
  Iff.intro (fun h => or_iff_not_imp_left.mpr fun hp => _) fun h =>
    h.elim (fun hp => hp.symm ▸ zero) fun hp => hp.symm ▸ one
state_before: M : Type ?u.12099
N : Type ?u.12102
S : Type ?u.12105
M₀ : Type ?u.12108
M₁ : Type ?u.12111
R : Type ?u.12114
G : Type ?u.12117
G₀ : Type u_1
inst✝⁷ : Mul M
inst✝⁶ : Monoid N
inst✝⁵ : Semigroup S
inst✝⁴ : MulZeroClass M₀
inst✝³ : MulOneClass M₁
inst✝² : NonAssocRing R
inst✝¹ : Group G
inst✝ : CancelMonoidWithZero G₀
p : G₀
⊢ IsIdempotentElem p ↔ p = 0 ∨ p = 1

tactic: exact mul_left_cancel₀ hp (h.trans (mul_one p).symm)
state_before: M : Type ?u.12099
N : Type ?u.12102
S : Type ?u.12105
M₀ : Type ?u.12108
M₁ : Type ?u.12111
R : Type ?u.12114
G : Type ?u.12117
G₀ : Type u_1
inst✝⁷ : Mul M
inst✝⁶ : Monoid N
inst✝⁵ : Semigroup S
inst✝⁴ : MulZeroClass M₀
inst✝³ : MulOneClass M₁
inst✝² : NonAssocRing R
inst✝¹ : Group G
inst✝ : CancelMonoidWithZero G₀
p : G₀
h : IsIdempotentElem p
hp : ¬p = 0
⊢ p = 1
Theorem: CategoryTheory.PreservesImage.inv_comp_image_ι_map
File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Images.lean

tactic: simp
state_before: A : Type u₁
B : Type u₂
inst✝⁷ : Category A
inst✝⁶ : Category B
inst✝⁵ : HasEqualizers A
inst✝⁴ : HasImages A
inst✝³ : StrongEpiCategory B
inst✝² : HasImages B
L : A ⥤ B
inst✝¹ : {X Y Z : A} → (f : X ⟶ Z) → (g : Y ⟶ Z) → PreservesLimit (cospan f g) L
inst✝ : {X Y Z : A} → (f : X ⟶ Y) → (g : X ⟶ Z) → PreservesColimit (span f g) L
X Y : A
f : X ⟶ Y
⊢ (iso L f).inv ≫ image.ι (L.map f) = L.map (image.ι f)
Theorem: neg_one_sq
File: Mathlib/Algebra/GroupPower/Ring.lean

tactic: simp [neg_sq, one_pow]
state_before: R : Type u_1
S : Type ?u.116177
M : Type ?u.116180
inst✝¹ : Monoid R
inst✝ : HasDistribNeg R
⊢ (-1) ^ 2 = 1
Theorem: isPrimePow_iff_factorization_eq_single
File: Mathlib/Data/Nat/Factorization/PrimePow.lean

tactic: rw [isPrimePow_nat_iff]
state_before: R : Type ?u.1643
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
⊢ IsPrimePow n ↔ ∃ p k, 0 < k ∧ Nat.factorization n = Finsupp.single p k

tactic: refine' exists₂_congr fun p k => _
state_before: R : Type ?u.1643
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
⊢ (∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n) ↔ ∃ p k, 0 < k ∧ Nat.factorization n = Finsupp.single p k

tactic: constructor
state_before: R : Type ?u.1643
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k✝ n p k : ℕ
⊢ Nat.Prime p ∧ 0 < k ∧ p ^ k = n ↔ 0 < k ∧ Nat.factorization n = Finsupp.single p k

tactic: rintro ⟨hp, hk, hn⟩
state_before: case mp
R : Type ?u.1643
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k✝ n p k : ℕ
⊢ Nat.Prime p ∧ 0 < k ∧ p ^ k = n → 0 < k ∧ Nat.factorization n = Finsupp.single p k

tactic: exact ⟨hk, by rw [← hn, Nat.Prime.factorization_pow hp]⟩
state_before: case mp.intro.intro
R : Type ?u.1643
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k✝ n p k : ℕ
hp : Nat.Prime p
hk : 0 < k
hn : p ^ k = n
⊢ 0 < k ∧ Nat.factorization n = Finsupp.single p k

tactic: rw [← hn, Nat.Prime.factorization_pow hp]
state_before: R : Type ?u.1643
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k✝ n p k : ℕ
hp : Nat.Prime p
hk : 0 < k
hn : p ^ k = n
⊢ Nat.factorization n = Finsupp.single p k

tactic: rintro ⟨hk, hn⟩
state_before: case mpr
R : Type ?u.1643
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k✝ n p k : ℕ
⊢ 0 < k ∧ Nat.factorization n = Finsupp.single p k → Nat.Prime p ∧ 0 < k ∧ p ^ k = n

tactic: have hn0 : n ≠ 0 := by
  rintro rfl
  simp_all only [Finsupp.single_eq_zero, eq_comm, Nat.factorization_zero, hk.ne']
state_before: case mpr.intro
R : Type ?u.1643
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k✝ n p k : ℕ
hk : 0 < k
hn : Nat.factorization n = Finsupp.single p k
⊢ Nat.Prime p ∧ 0 < k ∧ p ^ k = n

tactic: rw [Nat.eq_pow_of_factorization_eq_single hn0 hn]
state_before: case mpr.intro
R : Type ?u.1643
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k✝ n p k : ℕ
hk : 0 < k
hn : Nat.factorization n = Finsupp.single p k
hn0 : n ≠ 0
⊢ Nat.Prime p ∧ 0 < k ∧ p ^ k = n

tactic: exact
  ⟨Nat.prime_of_mem_factorization (by simp [hn, hk.ne'] : p ∈ n.factorization.support), hk, rfl⟩
state_before: case mpr.intro
R : Type ?u.1643
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k✝ n p k : ℕ
hk : 0 < k
hn : Nat.factorization n = Finsupp.single p k
hn0 : n ≠ 0
⊢ Nat.Prime p ∧ 0 < k ∧ p ^ k = p ^ k

tactic: rintro rfl
state_before: R : Type ?u.1643
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k✝ n p k : ℕ
hk : 0 < k
hn : Nat.factorization n = Finsupp.single p k
⊢ n ≠ 0

tactic: simp_all only [Finsupp.single_eq_zero, eq_comm, Nat.factorization_zero, hk.ne']
state_before: R : Type ?u.1643
inst✝ : CommMonoidWithZero R
n p✝ : R
k✝ p k : ℕ
hk : 0 < k
hn : Nat.factorization 0 = Finsupp.single p k
⊢ False

tactic: simp [hn, hk.ne']
state_before: R : Type ?u.1643
inst✝ : CommMonoidWithZero R
n✝ p✝ : R
k✝ n p k : ℕ
hk : 0 < k
hn : Nat.factorization n = Finsupp.single p k
hn0 : n ≠ 0
⊢ p ∈ (Nat.factorization n).support
Theorem: Finset.hasSum
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

tactic: rw [← sum_attach]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.34362
δ : Type ?u.34365
inst✝¹ : AddCommMonoid α
inst✝ : TopologicalSpace α
f✝ g : β → α
a b : α
s✝ s : Finset β
f : β → α
⊢ HasSum (f ∘ Subtype.val) (∑ b in s, f b)

tactic: exact hasSum_fintype _
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.34362
δ : Type ?u.34365
inst✝¹ : AddCommMonoid α
inst✝ : TopologicalSpace α
f✝ g : β → α
a b : α
s✝ s : Finset β
f : β → α
⊢ HasSum (f ∘ Subtype.val) (∑ x in attach s, f ↑x)
Theorem: List.prod_join
File: Mathlib/Data/List/BigOperators/Basic.lean

tactic: induction l <;> [rfl; simp only [*, List.join, map, prod_append, prod_cons]]
state_before: ι : Type ?u.10461
α : Type ?u.10464
M : Type u_1
N : Type ?u.10470
P : Type ?u.10473
M₀ : Type ?u.10476
G : Type ?u.10479
R : Type ?u.10482
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
l✝ l₁ l₂ : List M
a : M
l : List (List M)
⊢ prod (join l) = prod (map prod l)
Theorem: Complex.abs_le_abs_re_add_abs_im
File: Mathlib/Data/Complex/Basic.lean

tactic: simpa [re_add_im] using Complex.abs.add_le z.re (z.im * I)
state_before: z : ℂ
⊢ ↑abs z ≤ Abs.abs z.re + Abs.abs z.im
Theorem: Finsupp.mem_antidiagonal
File: Mathlib/Data/Finsupp/Antidiagonal.lean

tactic: rcases p with ⟨p₁, p₂⟩
state_before: α : Type u
f : α →₀ ℕ
p : (α →₀ ℕ) × (α →₀ ℕ)
⊢ p ∈ antidiagonal f ↔ p.fst + p.snd = f

tactic: simp [antidiagonal, antidiagonal', ← and_assoc, ← Finsupp.toMultiset.apply_eq_iff_eq]
state_before: case mk
α : Type u
f p₁ p₂ : α →₀ ℕ
⊢ (p₁, p₂) ∈ antidiagonal f ↔ (p₁, p₂).fst + (p₁, p₂).snd = f
Theorem: dist_vadd_left
File: Mathlib/Analysis/Normed/Group/AddTorsor.lean

tactic: rw [dist_eq_norm_vsub V _ x, vadd_vsub]
state_before: α : Type ?u.10317
V : Type u_2
P : Type u_1
W : Type ?u.10326
Q : Type ?u.10329
inst✝⁵ : SeminormedAddCommGroup V
inst✝⁴ : PseudoMetricSpace P
inst✝³ : NormedAddTorsor V P
inst✝² : NormedAddCommGroup W
inst✝¹ : MetricSpace Q
inst✝ : NormedAddTorsor W Q
v : V
x : P
⊢ dist (v +ᵥ x) x = ‖v‖
Theorem: prod_le_borel_prod
File: Mathlib/MeasureTheory/Constructions/BorelSpace/Basic.lean

tactic: rw [‹BorelSpace α›.measurable_eq, ‹BorelSpace β›.measurable_eq]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.1049718
γ₂ : Type ?u.1049721
δ : Type ?u.1049724
ι : Sort y
s t u : Set α
inst✝⁹ : TopologicalSpace α
inst✝⁸ : MeasurableSpace α
inst✝⁷ : BorelSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : MeasurableSpace β
inst✝⁴ : BorelSpace β
inst✝³ : TopologicalSpace γ
inst✝² : MeasurableSpace γ
inst✝¹ : BorelSpace γ
inst✝ : MeasurableSpace δ
⊢ Prod.instMeasurableSpace ≤ borel (α × β)

tactic: refine' sup_le _ _
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.1049718
γ₂ : Type ?u.1049721
δ : Type ?u.1049724
ι : Sort y
s t u : Set α
inst✝⁹ : TopologicalSpace α
inst✝⁸ : MeasurableSpace α
inst✝⁷ : BorelSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : MeasurableSpace β
inst✝⁴ : BorelSpace β
inst✝³ : TopologicalSpace γ
inst✝² : MeasurableSpace γ
inst✝¹ : BorelSpace γ
inst✝ : MeasurableSpace δ
⊢ Prod.instMeasurableSpace ≤ borel (α × β)

tactic: exact comap_le_iff_le_map.mpr continuous_fst.borel_measurable
state_before: case refine'_1
α : Type u_1
β : Type u_2
γ : Type ?u.1049718
γ₂ : Type ?u.1049721
δ : Type ?u.1049724
ι : Sort y
s t u : Set α
inst✝⁹ : TopologicalSpace α
inst✝⁸ : MeasurableSpace α
inst✝⁷ : BorelSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : MeasurableSpace β
inst✝⁴ : BorelSpace β
inst✝³ : TopologicalSpace γ
inst✝² : MeasurableSpace γ
inst✝¹ : BorelSpace γ
inst✝ : MeasurableSpace δ
⊢ MeasurableSpace.comap Prod.fst (borel α) ≤ borel (α × β)

tactic: exact comap_le_iff_le_map.mpr continuous_snd.borel_measurable
state_before: case refine'_2
α : Type u_1
β : Type u_2
γ : Type ?u.1049718
γ₂ : Type ?u.1049721
δ : Type ?u.1049724
ι : Sort y
s t u : Set α
inst✝⁹ : TopologicalSpace α
inst✝⁸ : MeasurableSpace α
inst✝⁷ : BorelSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : MeasurableSpace β
inst✝⁴ : BorelSpace β
inst✝³ : TopologicalSpace γ
inst✝² : MeasurableSpace γ
inst✝¹ : BorelSpace γ
inst✝ : MeasurableSpace δ
⊢ MeasurableSpace.comap Prod.snd (borel β) ≤ borel (α × β)
Theorem: Part.assert_pos
File: Mathlib/Data/Part.lean

tactic: dsimp [assert]
state_before: α : Type u_1
β : Type ?u.15915
γ : Type ?u.15918
p : Prop
f : p → Part α
h : p
⊢ assert p f = f h

tactic: cases h' : f h
state_before: α : Type u_1
β : Type ?u.15915
γ : Type ?u.15918
p : Prop
f : p → Part α
h : p
⊢ { Dom := ∃ h, (f h).Dom, get := fun ha => get (f (_ : p)) (_ : (f (_ : p)).Dom) } = f h

tactic: simp [h', mk.injEq, h, exists_prop_of_true, true_and]
state_before: case mk
α : Type u_1
β : Type ?u.15915
γ : Type ?u.15918
p : Prop
f : p → Part α
h : p
Dom✝ : Prop
get✝ : Dom✝ → α
h' : f h = { Dom := Dom✝, get := get✝ }
⊢ { Dom := ∃ h, (f h).Dom, get := fun ha => get (f (_ : p)) (_ : (f (_ : p)).Dom) } = { Dom := Dom✝, get := get✝ }

tactic: apply Function.hfunext
state_before: case mk
α : Type u_1
β : Type ?u.15915
γ : Type ?u.15918
p : Prop
f : p → Part α
h : p
Dom✝ : Prop
get✝ : Dom✝ → α
h' : f h = { Dom := Dom✝, get := get✝ }
⊢ HEq (fun ha => get✝ (_ : { Dom := Dom✝, get := get✝ }.Dom)) get✝

tactic: simp only [h, h', exists_prop_of_true]
state_before: case mk.hα
α : Type u_1
β : Type ?u.15915
γ : Type ?u.15918
p : Prop
f : p → Part α
h : p
Dom✝ : Prop
get✝ : Dom✝ → α
h' : f h = { Dom := Dom✝, get := get✝ }
⊢ (∃ h, (f h).Dom) = Dom✝

tactic: aesop
state_before: case mk.h
α : Type u_1
β : Type ?u.15915
γ : Type ?u.15918
p : Prop
f : p → Part α
h : p
Dom✝ : Prop
get✝ : Dom✝ → α
h' : f h = { Dom := Dom✝, get := get✝ }
⊢ ∀ (a : ∃ h, (f h).Dom) (a' : Dom✝), HEq a a' → HEq (get✝ (_ : { Dom := Dom✝, get := get✝ }.Dom)) (get✝ a')
Theorem: Nat.Partrec.rfind'
File: Mathlib/Computability/PartrecCode.lean

tactic: refine'
  Partrec.map
    ((@Partrec₂.unpaired' fun a b : ℕ =>
          Nat.rfind fun n => (fun m => m = 0) <$> f (Nat.pair a (n + b))).1
      _)
    (Primrec.nat_add.comp Primrec.snd <| Primrec.snd.comp Primrec.fst).to_comp.to₂
state_before: f : ℕ →. ℕ
hf : Partrec f
⊢ Partrec₂ fun a m =>
    Part.map (fun x => x + m) (Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a (n + m)))

tactic: have : Nat.Partrec (fun a => Nat.rfind (fun n => (fun m => decide (m = 0)) <$>
  Nat.unpaired (fun a b => f (Nat.pair (Nat.unpair a).1 (b + (Nat.unpair a).2)))
    (Nat.pair a n))) :=
  rfind
    (Partrec₂.unpaired'.2
      ((Partrec.nat_iff.2 hf).comp
          (Primrec₂.pair.comp (Primrec.fst.comp <| Primrec.unpair.comp Primrec.fst)
              (Primrec.nat_add.comp Primrec.snd
                (Primrec.snd.comp <| Primrec.unpair.comp Primrec.fst))).to_comp))
state_before: f : ℕ →. ℕ
hf : Partrec f
⊢ Partrec (unpaired fun a b => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a (n + b)))

tactic: simp at this
state_before: f : ℕ →. ℕ
hf : Partrec f
this :
  Partrec fun a =>
    Nat.rfind fun n =>
      (fun m => decide (m = 0)) <$>
        unpaired (fun a b => f (Nat.pair (unpair a).fst (b + (unpair a).snd))) (Nat.pair a n)
⊢ Partrec (unpaired fun a b => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a (n + b)))

tactic: exact this
state_before: f : ℕ →. ℕ
hf : Partrec f
this :
  Partrec fun a =>
    Nat.rfind fun n => Part.map (fun m => decide (m = 0)) (f (Nat.pair (unpair a).fst (n + (unpair a).snd)))
⊢ Partrec (unpaired fun a b => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a (n + b)))
Theorem: mul_mul_invOf_self_cancel
File: Mathlib/Algebra/Invertible.lean

tactic: simp [mul_assoc]
state_before: α : Type u
inst✝¹ : Monoid α
a b : α
inst✝ : Invertible b
⊢ a * b * ⅟b = a