1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Ordinal.bsup_eq_zero_iff
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: refine
  ⟨fun h i hi => ?_, fun h =>
    le_antisymm (bsup_le fun i hi => Ordinal.le_zero.2 (h i hi)) (Ordinal.zero_le _)⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal.{u_4}
f : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_5 u_4}
⊢ o.bsup f = 0 ↔ ∀ (i : Ordinal.{u_4}) (hi : i < o), f i hi = 0
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal.{u_4}
f : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_5 u_4}
h : o.bsup f = 0
i : Ordinal.{u_4}
hi : i < o
⊢ f i hi = 0

tactic: rw [← Ordinal.le_zero, ← h]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal.{u_4}
f : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_5 u_4}
h : o.bsup f = 0
i : Ordinal.{u_4}
hi : i < o
⊢ f i hi = 0
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal.{u_4}
f : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_5 u_4}
h : o.bsup f = 0
i : Ordinal.{u_4}
hi : i < o
⊢ f i hi ≤ o.bsup f

tactic: exact le_bsup f i hi
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal.{u_4}
f : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_5 u_4}
h : o.bsup f = 0
i : Ordinal.{u_4}
hi : i < o
⊢ f i hi ≤ o.bsup f
state_after: no goals
Theorem: List.countP_bind
File: Mathlib/Algebra/BigOperators/Group/List.lean

tactic: rw [List.bind, countP_join, map_map]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
p : β → Bool
l : List α
f : α → List β
⊢ countP p (l.bind f) = (map (countP p ∘ f) l).sum
state_after: no goals
Theorem: addRothNumber_Ico
File: Mathlib/Combinatorics/Additive/AP/Three/Defs.lean

tactic: obtain h | h := le_total b a
state_before: F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
s : Finset ℕ
k n a b : ℕ
⊢ addRothNumber (Ico a b) = rothNumberNat (b - a)
state_after: case inl
F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
s : Finset ℕ
k n a b : ℕ
h : b ≤ a
⊢ addRothNumber (Ico a b) = rothNumberNat (b - a)

case inr
F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
s : Finset ℕ
k n a b : ℕ
h : a ≤ b
⊢ addRothNumber (Ico a b) = rothNumberNat (b - a)

tactic: convert addRothNumber_map_add_left _ a
state_before: case inr
F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
s : Finset ℕ
k n a b : ℕ
h : a ≤ b
⊢ addRothNumber (Ico a b) = rothNumberNat (b - a)
state_after: case h.e'_2.h.e'_6
F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
s : Finset ℕ
k n a b : ℕ
h : a ≤ b
⊢ Ico a b = map (addLeftEmbedding a) (range (b - a))

tactic: rw [range_eq_Ico, map_eq_image]
state_before: case h.e'_2.h.e'_6
F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
s : Finset ℕ
k n a b : ℕ
h : a ≤ b
⊢ Ico a b = map (addLeftEmbedding a) (range (b - a))
state_after: case h.e'_2.h.e'_6
F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
s : Finset ℕ
k n a b : ℕ
h : a ≤ b
⊢ Ico a b = image (⇑(addLeftEmbedding a)) (Ico 0 (b - a))

tactic: convert (image_add_left_Ico 0 (b - a) _).symm
state_before: case h.e'_2.h.e'_6
F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
s : Finset ℕ
k n a b : ℕ
h : a ≤ b
⊢ Ico a b = image (⇑(addLeftEmbedding a)) (Ico 0 (b - a))
state_after: case h.e'_2.h.e'_5
F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
s : Finset ℕ
k n a b : ℕ
h : a ≤ b
⊢ b = a + (b - a)

tactic: exact (add_tsub_cancel_of_le h).symm
state_before: case h.e'_2.h.e'_5
F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
s : Finset ℕ
k n a b : ℕ
h : a ≤ b
⊢ b = a + (b - a)
state_after: no goals

tactic: rw [tsub_eq_zero_of_le h, Ico_eq_empty_of_le h, rothNumberNat_zero, addRothNumber_empty]
state_before: case inl
F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
s : Finset ℕ
k n a b : ℕ
h : b ≤ a
⊢ addRothNumber (Ico a b) = rothNumberNat (b - a)
state_after: no goals
Theorem: lTensor.inverse_comp_lTensor
File: Mathlib/LinearAlgebra/TensorProduct/RightExactness.lean

tactic: rw [lTensor.inverse, lTensor.inverse_of_rightInverse_comp_lTensor]
state_before: R : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup N
inst✝⁵ : AddCommGroup P
inst✝⁴ : Module R M
inst✝³ : Module R N
inst✝² : Module R P
f : M →ₗ[R] N
g : N →ₗ[R] P
Q : Type u_5
inst✝¹ : AddCommGroup Q
inst✝ : Module R Q
hfg : Exact ⇑f ⇑g
hg : Surjective ⇑g
⊢ inverse Q hfg hg ∘ₗ lTensor Q g = (range (lTensor Q f)).mkQ
state_after: no goals
Theorem: List.sym_map
File: Mathlib/Data/List/Sym.lean

tactic: simp only [List.sym]
state_before: α : Type u_1
xs✝ ys : List α
n✝ : ℕ
β : Type u_2
f : α → β
n : ℕ
xs x✝ : List α
⊢ List.sym 0 (map f x✝) = map (Sym.map f) (List.sym 0 x✝)
state_after: α : Type u_1
xs✝ ys : List α
n✝ : ℕ
β : Type u_2
f : α → β
n : ℕ
xs x✝ : List α
⊢ [Sym.nil] = map (Sym.map f) [Sym.nil]

tactic: rfl
state_before: α : Type u_1
xs✝ ys : List α
n✝ : ℕ
β : Type u_2
f : α → β
n : ℕ
xs x✝ : List α
⊢ [Sym.nil] = map (Sym.map f) [Sym.nil]
state_after: no goals

tactic: simp [List.sym]
state_before: α : Type u_1
xs✝ ys : List α
n✝¹ : ℕ
β : Type u_2
f : α → β
n✝ : ℕ
xs : List α
n : ℕ
⊢ List.sym (n + 1) (map f []) = map (Sym.map f) (List.sym (n + 1) [])
state_after: no goals

tactic: rw [map_cons, List.sym, ← map_cons, sym_map f n (x :: xs), sym_map f (n + 1) xs]
state_before: α : Type u_1
xs✝¹ ys : List α
n✝¹ : ℕ
β : Type u_2
f : α → β
n✝ : ℕ
xs✝ : List α
n : ℕ
x : α
xs : List α
⊢ List.sym (n + 1) (map f (x :: xs)) = map (Sym.map f) (List.sym (n + 1) (x :: xs))
state_after: α : Type u_1
xs✝¹ ys : List α
n✝¹ : ℕ
β : Type u_2
f : α → β
n✝ : ℕ
xs✝ : List α
n : ℕ
x : α
xs : List α
⊢ map (fun p => f x ::ₛ p) (map (Sym.map f) (List.sym n (x :: xs))) ++ map (Sym.map f) (List.sym (n + 1) xs) =
    map (Sym.map f) (List.sym (n + 1) (x :: xs))

tactic: simp only [map_map, List.sym, map_append, append_cancel_right_eq]
state_before: α : Type u_1
xs✝¹ ys : List α
n✝¹ : ℕ
β : Type u_2
f : α → β
n✝ : ℕ
xs✝ : List α
n : ℕ
x : α
xs : List α
⊢ map (fun p => f x ::ₛ p) (map (Sym.map f) (List.sym n (x :: xs))) ++ map (Sym.map f) (List.sym (n + 1) xs) =
    map (Sym.map f) (List.sym (n + 1) (x :: xs))
state_after: α : Type u_1
xs✝¹ ys : List α
n✝¹ : ℕ
β : Type u_2
f : α → β
n✝ : ℕ
xs✝ : List α
n : ℕ
x : α
xs : List α
⊢ map ((fun p => f x ::ₛ p) ∘ Sym.map f) (List.sym n (x :: xs)) =
    map (Sym.map f ∘ fun p => x ::ₛ p) (List.sym n (x :: xs))

tactic: congr
state_before: α : Type u_1
xs✝¹ ys : List α
n✝¹ : ℕ
β : Type u_2
f : α → β
n✝ : ℕ
xs✝ : List α
n : ℕ
x : α
xs : List α
⊢ map ((fun p => f x ::ₛ p) ∘ Sym.map f) (List.sym n (x :: xs)) =
    map (Sym.map f ∘ fun p => x ::ₛ p) (List.sym n (x :: xs))
state_after: case e_f
α : Type u_1
xs✝¹ ys : List α
n✝¹ : ℕ
β : Type u_2
f : α → β
n✝ : ℕ
xs✝ : List α
n : ℕ
x : α
xs : List α
⊢ (fun p => f x ::ₛ p) ∘ Sym.map f = Sym.map f ∘ fun p => x ::ₛ p

tactic: ext s
state_before: case e_f
α : Type u_1
xs✝¹ ys : List α
n✝¹ : ℕ
β : Type u_2
f : α → β
n✝ : ℕ
xs✝ : List α
n : ℕ
x : α
xs : List α
⊢ (fun p => f x ::ₛ p) ∘ Sym.map f = Sym.map f ∘ fun p => x ::ₛ p
state_after: case e_f.h.h
α : Type u_1
xs✝¹ ys : List α
n✝¹ : ℕ
β : Type u_2
f : α → β
n✝ : ℕ
xs✝ : List α
n : ℕ
x : α
xs : List α
s : Sym α n
⊢ ↑(((fun p => f x ::ₛ p) ∘ Sym.map f) s) = ↑((Sym.map f ∘ fun p => x ::ₛ p) s)

tactic: simp only [Function.comp_apply, Sym.map_cons]
state_before: case e_f.h.h
α : Type u_1
xs✝¹ ys : List α
n✝¹ : ℕ
β : Type u_2
f : α → β
n✝ : ℕ
xs✝ : List α
n : ℕ
x : α
xs : List α
s : Sym α n
⊢ ↑(((fun p => f x ::ₛ p) ∘ Sym.map f) s) = ↑((Sym.map f ∘ fun p => x ::ₛ p) s)
state_after: no goals
Theorem: Set.exists_set_mem_of_union_eq_top
File: Mathlib/Data/Set/Lattice.lean

tactic: have p : x ∈ ⊤ := Set.mem_univ x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι✝ : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι✝ → Sort u_7
κ₁ : ι✝ → Sort u_8
κ₂ : ι✝ → Sort u_9
κ' : ι' → Sort u_10
ι : Type u_11
t : Set ι
s : ι → Set β
w : ⋃ i ∈ t, s i = ⊤
x : β
⊢ ∃ i ∈ t, x ∈ s i
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι✝ : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι✝ → Sort u_7
κ₁ : ι✝ → Sort u_8
κ₂ : ι✝ → Sort u_9
κ' : ι' → Sort u_10
ι : Type u_11
t : Set ι
s : ι → Set β
w : ⋃ i ∈ t, s i = ⊤
x : β
p : x ∈ ⊤
⊢ ∃ i ∈ t, x ∈ s i

tactic: rw [← w, Set.mem_iUnion] at p
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι✝ : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι✝ → Sort u_7
κ₁ : ι✝ → Sort u_8
κ₂ : ι✝ → Sort u_9
κ' : ι' → Sort u_10
ι : Type u_11
t : Set ι
s : ι → Set β
w : ⋃ i ∈ t, s i = ⊤
x : β
p : x ∈ ⊤
⊢ ∃ i ∈ t, x ∈ s i
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι✝ : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι✝ → Sort u_7
κ₁ : ι✝ → Sort u_8
κ₂ : ι✝ → Sort u_9
κ' : ι' → Sort u_10
ι : Type u_11
t : Set ι
s : ι → Set β
w : ⋃ i ∈ t, s i = ⊤
x : β
p : ∃ i, x ∈ ⋃ (_ : i ∈ t), s i
⊢ ∃ i ∈ t, x ∈ s i

tactic: simpa using p
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι✝ : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι✝ → Sort u_7
κ₁ : ι✝ → Sort u_8
κ₂ : ι✝ → Sort u_9
κ' : ι' → Sort u_10
ι : Type u_11
t : Set ι
s : ι → Set β
w : ⋃ i ∈ t, s i = ⊤
x : β
p : ∃ i, x ∈ ⋃ (_ : i ∈ t), s i
⊢ ∃ i ∈ t, x ∈ s i
state_after: no goals
Theorem: DFinsupp.filter_pos_add_filter_neg
File: Mathlib/Data/DFinsupp/Basic.lean

tactic: simp only [add_apply, filter_apply]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : (i : ι) → AddZeroClass (β i)
f : Π₀ (i : ι), β i
p : ι → Prop
inst✝ : DecidablePred p
i : ι
⊢ (filter p f + filter (fun i => ¬p i) f) i = f i
state_after: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : (i : ι) → AddZeroClass (β i)
f : Π₀ (i : ι), β i
p : ι → Prop
inst✝ : DecidablePred p
i : ι
⊢ ((if p i then f i else 0) + if ¬p i then f i else 0) = f i

tactic: split_ifs <;> simp only [add_zero, zero_add]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : (i : ι) → AddZeroClass (β i)
f : Π₀ (i : ι), β i
p : ι → Prop
inst✝ : DecidablePred p
i : ι
⊢ ((if p i then f i else 0) + if ¬p i then f i else 0) = f i
state_after: no goals
Theorem: Ring.exists_not_isUnit_of_not_isField
File: Mathlib/RingTheory/Ideal/Basic.lean

tactic: have : ¬_ := fun h => hf ⟨exists_pair_ne R, mul_comm, h⟩
state_before: α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
hf : ¬IsField R
⊢ ∃ x, ∃ (_ : x ≠ 0), ¬IsUnit x
state_after: α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
hf : ¬IsField R
this : ¬∀ {a : R}, a ≠ 0 → ∃ b, a * b = 1
⊢ ∃ x, ∃ (_ : x ≠ 0), ¬IsUnit x

tactic: simp_rw [isUnit_iff_exists_inv]
state_before: α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
hf : ¬IsField R
this : ¬∀ {a : R}, a ≠ 0 → ∃ b, a * b = 1
⊢ ∃ x, ∃ (_ : x ≠ 0), ¬IsUnit x
state_after: α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
hf : ¬IsField R
this : ¬∀ {a : R}, a ≠ 0 → ∃ b, a * b = 1
⊢ ∃ x, ∃ (_ : x ≠ 0), ¬∃ b, x * b = 1

tactic: push_neg at this ⊢
state_before: α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
hf : ¬IsField R
this : ¬∀ {a : R}, a ≠ 0 → ∃ b, a * b = 1
⊢ ∃ x, ∃ (_ : x ≠ 0), ¬∃ b, x * b = 1
state_after: α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
hf : ¬IsField R
this : ∃ a, a ≠ 0 ∧ ∀ (b : R), a * b ≠ 1
⊢ ∃ x, ∃ (_ : x ≠ 0), ∀ (b : R), x * b ≠ 1

tactic: obtain ⟨x, hx, not_unit⟩ := this
state_before: α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
hf : ¬IsField R
this : ∃ a, a ≠ 0 ∧ ∀ (b : R), a * b ≠ 1
⊢ ∃ x, ∃ (_ : x ≠ 0), ∀ (b : R), x * b ≠ 1
state_after: case intro.intro
α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
hf : ¬IsField R
x : R
hx : x ≠ 0
not_unit : ∀ (b : R), x * b ≠ 1
⊢ ∃ x, ∃ (_ : x ≠ 0), ∀ (b : R), x * b ≠ 1

tactic: exact ⟨x, hx, not_unit⟩
state_before: case intro.intro
α : Type u
β : Type v
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Nontrivial R
hf : ¬IsField R
x : R
hx : x ≠ 0
not_unit : ∀ (b : R), x * b ≠ 1
⊢ ∃ x, ∃ (_ : x ≠ 0), ∀ (b : R), x * b ≠ 1
state_after: no goals
Theorem: Monovary.sum_comp_perm_smul_eq_sum_smul_iff
File: Mathlib/Algebra/Order/Rearrangement.lean

tactic: simp [(hfg.monovaryOn _).sum_comp_perm_smul_eq_sum_smul_iff fun _ _ ↦ mem_univ _]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : LinearOrderedRing α
inst✝³ : LinearOrderedAddCommGroup β
inst✝² : Module α β
inst✝¹ : OrderedSMul α β
s : Finset ι
σ : Perm ι
f : ι → α
g : ι → β
inst✝ : Fintype ι
hfg : Monovary f g
⊢ ∑ i : ι, f (σ i) • g i = ∑ i : ι, f i • g i ↔ Monovary (f ∘ ⇑σ) g
state_after: no goals
Theorem: EuclideanGeometry.angle_self_left
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean

tactic: unfold angle
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p✝ p₀✝ p₁ p₂ p₀ p : P
⊢ ∠ p₀ p₀ p = π / 2
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p✝ p₀✝ p₁ p₂ p₀ p : P
⊢ InnerProductGeometry.angle (p₀ -ᵥ p₀) (p -ᵥ p₀) = π / 2

tactic: rw [vsub_self]
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p✝ p₀✝ p₁ p₂ p₀ p : P
⊢ InnerProductGeometry.angle (p₀ -ᵥ p₀) (p -ᵥ p₀) = π / 2
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p✝ p₀✝ p₁ p₂ p₀ p : P
⊢ InnerProductGeometry.angle 0 (p -ᵥ p₀) = π / 2

tactic: exact angle_zero_left _
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p✝ p₀✝ p₁ p₂ p₀ p : P
⊢ InnerProductGeometry.angle 0 (p -ᵥ p₀) = π / 2
state_after: no goals
Theorem: Cardinal.power_self_eq
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: apply ((power_le_power_right <| (cantor c).le).trans _).antisymm
state_before: c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ c ^ c = 2 ^ c
state_after: c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ 2 ^ c ≤ c ^ c

c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ (2 ^ c) ^ c ≤ 2 ^ c

tactic: exact power_le_power_right ((nat_lt_aleph0 2).le.trans h)
state_before: c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ 2 ^ c ≤ c ^ c
state_after: no goals

tactic: rw [← power_mul, mul_eq_self h]
state_before: c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ (2 ^ c) ^ c ≤ 2 ^ c
state_after: no goals
Theorem: Finset.one_mem_div_iff
File: Mathlib/Data/Finset/Pointwise.lean

tactic: rw [← mem_coe, ← disjoint_coe, coe_div, Set.one_mem_div_iff]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝⁵ : DecidableEq α
inst✝⁴ : DecidableEq β
inst✝³ : Group α
inst✝² : DivisionMonoid β
inst✝¹ : FunLike F α β
inst✝ : MonoidHomClass F α β
f : F
s t : Finset α
a b : α
⊢ 1 ∈ s / t ↔ ¬Disjoint s t
state_after: no goals
Theorem: AlgebraicGeometry.Scheme.Pullback.pullbackP1Iso_hom_ι
File: Mathlib/AlgebraicGeometry/Pullbacks.lean

tactic: rw [← gluing_ι, ← pullbackP1Iso_inv_fst, Iso.hom_inv_id_assoc]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : X.OpenCover
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (𝒰.map i ≫ f) g
s : PullbackCone f g
i : 𝒰.J
⊢ (pullbackP1Iso 𝒰 f g i).hom ≫ Multicoequalizer.π (gluing 𝒰 f g).diagram i = pullback.fst
state_after: no goals
Theorem: Nat.choose_symm_of_eq_add
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: suffices choose n (n - b) = choose n b by
  rw [h, Nat.add_sub_cancel_right] at this; rwa [h]
state_before: n a b : ℕ
h : n = a + b
⊢ n.choose a = n.choose b
state_after: n a b : ℕ
h : n = a + b
⊢ n.choose (n - b) = n.choose b

tactic: exact choose_symm (h ▸ le_add_left _ _)
state_before: n a b : ℕ
h : n = a + b
⊢ n.choose (n - b) = n.choose b
state_after: no goals

tactic: rw [h, Nat.add_sub_cancel_right] at this
state_before: n a b : ℕ
h : n = a + b
this : n.choose (n - b) = n.choose b
⊢ n.choose a = n.choose b
state_after: n a b : ℕ
h : n = a + b
this : (a + b).choose a = (a + b).choose b
⊢ n.choose a = n.choose b

tactic: rwa [h]
state_before: n a b : ℕ
h : n = a + b
this : (a + b).choose a = (a + b).choose b
⊢ n.choose a = n.choose b
state_after: no goals
Theorem: Nat.size_pos
File: Mathlib/Data/Nat/Size.lean

tactic: rw [lt_size]
state_before: n : ℕ
⊢ 0 < n.size ↔ 0 < n
state_after: n : ℕ
⊢ 2 ^ 0 ≤ n ↔ 0 < n

tactic: rfl
state_before: n : ℕ
⊢ 2 ^ 0 ≤ n ↔ 0 < n
state_after: no goals
Theorem: HasDerivAt.clog_real
File: Mathlib/Analysis/SpecialFunctions/Complex/LogDeriv.lean

tactic: simpa only [div_eq_inv_mul] using
  (hasStrictFDerivAt_log_real h₂).hasFDerivAt.comp_hasDerivAt x h₁
state_before: α : Type u_1
inst✝² : TopologicalSpace α
E : Type u_2
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
f : ℝ → ℂ
x : ℝ
f' : ℂ
h₁ : HasDerivAt f f' x
h₂ : f x ∈ slitPlane
⊢ HasDerivAt (fun t => log (f t)) (f' / f x) x
state_after: no goals
Theorem: MeasureTheory.laverage_union_mem_openSegment
File: Mathlib/MeasureTheory/Integral/Average.lean

tactic: refine
  ⟨μ s / (μ s + μ t), μ t / (μ s + μ t), ENNReal.div_pos hs₀ <| add_ne_top.2 ⟨hsμ, htμ⟩,
    ENNReal.div_pos ht₀ <| add_ne_top.2 ⟨hsμ, htμ⟩, ?_, (laverage_union hd ht).symm⟩
state_before: α : Type u_1
E : Type u_2
F : Type u_3
m0 : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
μ ν : Measure α
s t : Set α
f g : α → ℝ≥0∞
hd : AEDisjoint μ s t
ht : NullMeasurableSet t μ
hs₀ : μ s ≠ 0
ht₀ : μ t ≠ 0
hsμ : μ s ≠ ⊤
htμ : μ t ≠ ⊤
⊢ ⨍⁻ (x : α) in s ∪ t, f x ∂μ ∈ openSegment ℝ≥0∞ (⨍⁻ (x : α) in s, f x ∂μ) (⨍⁻ (x : α) in t, f x ∂μ)
state_after: α : Type u_1
E : Type u_2
F : Type u_3
m0 : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
μ ν : Measure α
s t : Set α
f g : α → ℝ≥0∞
hd : AEDisjoint μ s t
ht : NullMeasurableSet t μ
hs₀ : μ s ≠ 0
ht₀ : μ t ≠ 0
hsμ : μ s ≠ ⊤
htμ : μ t ≠ ⊤
⊢ μ s / (μ s + μ t) + μ t / (μ s + μ t) = 1

tactic: rw [← ENNReal.add_div,
  ENNReal.div_self (add_eq_zero.not.2 fun h => hs₀ h.1) (add_ne_top.2 ⟨hsμ, htμ⟩)]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
m0 : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
μ ν : Measure α
s t : Set α
f g : α → ℝ≥0∞
hd : AEDisjoint μ s t
ht : NullMeasurableSet t μ
hs₀ : μ s ≠ 0
ht₀ : μ t ≠ 0
hsμ : μ s ≠ ⊤
htμ : μ t ≠ ⊤
⊢ μ s / (μ s + μ t) + μ t / (μ s + μ t) = 1
state_after: no goals
Theorem: EuclideanGeometry.oangle_midpoint_rev_right
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean

tactic: rw [midpoint_comm, oangle_midpoint_right]
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
⊢ ∡ p₁ p₂ (midpoint ℝ p₂ p₃) = ∡ p₁ p₂ p₃
state_after: no goals
Theorem: List.reverse_infix
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: refine ⟨fun ⟨s, t, e⟩ => ⟨reverse t, reverse s, ?_⟩, fun ⟨s, t, e⟩ => ⟨reverse t, reverse s, ?_⟩⟩
state_before: α✝ : Type u_1
l₁ l₂ : List α✝
⊢ l₁.reverse <:+: l₂.reverse ↔ l₁ <:+: l₂
state_after: case refine_1
α✝ : Type u_1
l₁ l₂ : List α✝
x✝ : l₁.reverse <:+: l₂.reverse
s t : List α✝
e : s ++ l₁.reverse ++ t = l₂.reverse
⊢ t.reverse ++ l₁ ++ s.reverse = l₂

case refine_2
α✝ : Type u_1
l₁ l₂ : List α✝
x✝ : l₁ <:+: l₂
s t : List α✝
e : s ++ l₁ ++ t = l₂
⊢ t.reverse ++ l₁.reverse ++ s.reverse = l₂.reverse

tactic: rw [← reverse_reverse l₁, append_assoc, ← reverse_append, ← reverse_append, e,
  reverse_reverse]
state_before: case refine_1
α✝ : Type u_1
l₁ l₂ : List α✝
x✝ : l₁.reverse <:+: l₂.reverse
s t : List α✝
e : s ++ l₁.reverse ++ t = l₂.reverse
⊢ t.reverse ++ l₁ ++ s.reverse = l₂
state_after: no goals

tactic: rw [append_assoc, ← reverse_append, ← reverse_append, e]
state_before: case refine_2
α✝ : Type u_1
l₁ l₂ : List α✝
x✝ : l₁ <:+: l₂
s t : List α✝
e : s ++ l₁ ++ t = l₂
⊢ t.reverse ++ l₁.reverse ++ s.reverse = l₂.reverse
state_after: no goals
Theorem: Batteries.RBNode.upperBound?_reverse
File: .lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean

tactic: induction t generalizing ub <;> simp [lowerBound?, upperBound?]
state_before: α : Type u_1
t : RBNode α
cut : α → Ordering
ub : Option α
⊢ upperBound? cut t.reverse ub = lowerBound? (fun x => (cut x).swap) t ub
state_after: case node
α : Type u_1
cut : α → Ordering
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
l_ih✝ : ∀ (ub : Option α), upperBound? cut l✝.reverse ub = lowerBound? (fun x => (cut x).swap) l✝ ub
r_ih✝ : ∀ (ub : Option α), upperBound? cut r✝.reverse ub = lowerBound? (fun x => (cut x).swap) r✝ ub
ub : Option α
⊢ (match cut v✝ with
    | Ordering.lt => upperBound? cut r✝.reverse (some v✝)
    | Ordering.gt => upperBound? cut l✝.reverse ub
    | Ordering.eq => some v✝) =
    match (cut v✝).swap with
    | Ordering.lt => lowerBound? (fun x => (cut x).swap) l✝ ub
    | Ordering.gt => lowerBound? (fun x => (cut x).swap) r✝ (some v✝)
    | Ordering.eq => some v✝

tactic: split <;> simp [*, Ordering.swap]
state_before: case node
α : Type u_1
cut : α → Ordering
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
l_ih✝ : ∀ (ub : Option α), upperBound? cut l✝.reverse ub = lowerBound? (fun x => (cut x).swap) l✝ ub
r_ih✝ : ∀ (ub : Option α), upperBound? cut r✝.reverse ub = lowerBound? (fun x => (cut x).swap) r✝ ub
ub : Option α
⊢ (match cut v✝ with
    | Ordering.lt => upperBound? cut r✝.reverse (some v✝)
    | Ordering.gt => upperBound? cut l✝.reverse ub
    | Ordering.eq => some v✝) =
    match (cut v✝).swap with
    | Ordering.lt => lowerBound? (fun x => (cut x).swap) l✝ ub
    | Ordering.gt => lowerBound? (fun x => (cut x).swap) r✝ (some v✝)
    | Ordering.eq => some v✝
state_after: no goals
Theorem: Nat.nth_zero
File: Mathlib/Data/Nat/Nth.lean

tactic: rw [nth_eq_sInf]
state_before: p : ℕ → Prop
⊢ nth p 0 = sInf (setOf p)
state_after: p : ℕ → Prop
⊢ sInf {x | p x ∧ ∀ k < 0, nth p k < x} = sInf (setOf p)

tactic: simp
state_before: p : ℕ → Prop
⊢ sInf {x | p x ∧ ∀ k < 0, nth p k < x} = sInf (setOf p)
state_after: no goals
Theorem: Pi.card_Ioc
File: Mathlib/Data/Pi/Interval.lean

tactic: rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
state_before: ι : Type u_1
α : ι → Type u_2
inst✝⁴ : Fintype ι
inst✝³ : DecidableEq ι
inst✝² : (i : ι) → DecidableEq (α i)
inst✝¹ : (i : ι) → PartialOrder (α i)
inst✝ : (i : ι) → LocallyFiniteOrder (α i)
a b : (i : ι) → α i
⊢ (Ioc a b).card = ∏ i : ι, (Icc (a i) (b i)).card - 1
state_after: no goals