l3lab/ntp-mathlib huggingface dataset:
theorem card_map_eq_of_inj_on {f : α → β} {as : List α} :
    inj_on f as → card (as.map f) = card as := by
  induction as with
  | nil => simp
  | cons a as ih =>
    cases Decidable.em (f a ∈ map f as) with
    | inl h =>
      intro inj_on'
      cases (exists_of_mem_map h) with
      

Proof state:
case cons.inl.intro
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
a : α
as : List α
ih : inj_on f as → card (map f as) = card as
h : f a ∈ map f as
inj_on' : inj_on f (a :: as)
x : α
hx : x ∈ as ∧ f x = f a
⊢ card (map f (a :: as)) = card (a :: as)

Next tactic:
| intro x hx =>
        have : x = a := inj_on' (mem_cons_of_mem _ hx.1) (mem_cons_self ..) hx.2
        have h1 : a ∈ as := this ▸ hx.1
        have h2 : inj_on f as := inj_on_of_subset inj_on' (subset_cons _ _)
        rw [map, card_cons_of_mem h, ih h2, card_cons_of_mem h1]
theorem card_map_eq_of_inj_on {f : α → β} {as : List α} :
    inj_on f as → card (as.map f) = card as := by
  induction as with
  | nil => simp
  | cons a as ih =>
    cases Decidable.em (f a ∈ map f as) with
    | inl h =>
      intro inj_on'
      cases (exists_of_mem_map h) with
      | intro x hx =>
        

Proof state:
case cons.inl.intro
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
a : α
as : List α
ih : inj_on f as → card (map f as) = card as
h : f a ∈ map f as
inj_on' : inj_on f (a :: as)
x : α
hx : x ∈ as ∧ f x = f a
⊢ card (map f (a :: as)) = card (a :: as)

Next tactic:
have : x = a := inj_on' (mem_cons_of_mem _ hx.1) (mem_cons_self ..) hx.2
theorem card_map_eq_of_inj_on {f : α → β} {as : List α} :
    inj_on f as → card (as.map f) = card as := by
  induction as with
  | nil => simp
  | cons a as ih =>
    cases Decidable.em (f a ∈ map f as) with
    | inl h =>
      intro inj_on'
      cases (exists_of_mem_map h) with
      | intro x hx =>
        have : x = a := inj_on' (mem_cons_of_mem _ hx.1) (mem_cons_self ..) hx.2
        

Proof state:
case cons.inl.intro
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
a : α
as : List α
ih : inj_on f as → card (map f as) = card as
h : f a ∈ map f as
inj_on' : inj_on f (a :: as)
x : α
hx : x ∈ as ∧ f x = f a
this : x = a
⊢ card (map f (a :: as)) = card (a :: as)

Next tactic:
have h1 : a ∈ as := this ▸ hx.1
theorem card_map_eq_of_inj_on {f : α → β} {as : List α} :
    inj_on f as → card (as.map f) = card as := by
  induction as with
  | nil => simp
  | cons a as ih =>
    cases Decidable.em (f a ∈ map f as) with
    | inl h =>
      intro inj_on'
      cases (exists_of_mem_map h) with
      | intro x hx =>
        have : x = a := inj_on' (mem_cons_of_mem _ hx.1) (mem_cons_self ..) hx.2
        have h1 : a ∈ as := this ▸ hx.1
        

Proof state:
case cons.inl.intro
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
a : α
as : List α
ih : inj_on f as → card (map f as) = card as
h : f a ∈ map f as
inj_on' : inj_on f (a :: as)
x : α
hx : x ∈ as ∧ f x = f a
this : x = a
h1 : a ∈ as
⊢ card (map f (a :: as)) = card (a :: as)

Next tactic:
have h2 : inj_on f as := inj_on_of_subset inj_on' (subset_cons _ _)
theorem card_map_eq_of_inj_on {f : α → β} {as : List α} :
    inj_on f as → card (as.map f) = card as := by
  induction as with
  | nil => simp
  | cons a as ih =>
    cases Decidable.em (f a ∈ map f as) with
    | inl h =>
      intro inj_on'
      cases (exists_of_mem_map h) with
      | intro x hx =>
        have : x = a := inj_on' (mem_cons_of_mem _ hx.1) (mem_cons_self ..) hx.2
        have h1 : a ∈ as := this ▸ hx.1
        have h2 : inj_on f as := inj_on_of_subset inj_on' (subset_cons _ _)
        

Proof state:
case cons.inl.intro
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
a : α
as : List α
ih : inj_on f as → card (map f as) = card as
h : f a ∈ map f as
inj_on' : inj_on f (a :: as)
x : α
hx : x ∈ as ∧ f x = f a
this : x = a
h1 : a ∈ as
h2 : inj_on f as
⊢ card (map f (a :: as)) = card (a :: as)

Next tactic:
rw [map, card_cons_of_mem h, ih h2, card_cons_of_mem h1]
theorem card_map_eq_of_inj_on {f : α → β} {as : List α} :
    inj_on f as → card (as.map f) = card as := by
  induction as with
  | nil => simp
  | cons a as ih =>
    cases Decidable.em (f a ∈ map f as) with
    | inl h =>
      intro inj_on'
      cases (exists_of_mem_map h) with
      | intro x hx =>
        have : x = a := inj_on' (mem_cons_of_mem _ hx.1) (mem_cons_self ..) hx.2
        have h1 : a ∈ as := this ▸ hx.1
        have h2 : inj_on f as := inj_on_of_subset inj_on' (subset_cons _ _)
        rw [map, card_cons_of_mem h, ih h2, card_cons_of_mem h1]
    

Proof state:
case cons.inr
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
a : α
as : List α
ih : inj_on f as → card (map f as) = card as
h : ¬f a ∈ map f as
⊢ inj_on f (a :: as) → card (map f (a :: as)) = card (a :: as)

Next tactic:
| inr h =>
      intro inj_on'
      have h1 : a ∉ as := fun h'' ↦ h (mem_map_of_mem _ h'')
      have h2 : inj_on f as := inj_on_of_subset inj_on' (subset_cons _ _)
      rw [map, card_cons_of_not_mem h, card_cons_of_not_mem h1, ih h2]
theorem card_map_eq_of_inj_on {f : α → β} {as : List α} :
    inj_on f as → card (as.map f) = card as := by
  induction as with
  | nil => simp
  | cons a as ih =>
    cases Decidable.em (f a ∈ map f as) with
    | inl h =>
      intro inj_on'
      cases (exists_of_mem_map h) with
      | intro x hx =>
        have : x = a := inj_on' (mem_cons_of_mem _ hx.1) (mem_cons_self ..) hx.2
        have h1 : a ∈ as := this ▸ hx.1
        have h2 : inj_on f as := inj_on_of_subset inj_on' (subset_cons _ _)
        rw [map, card_cons_of_mem h, ih h2, card_cons_of_mem h1]
    | inr h =>
      

Proof state:
case cons.inr
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
a : α
as : List α
ih : inj_on f as → card (map f as) = card as
h : ¬f a ∈ map f as
⊢ inj_on f (a :: as) → card (map f (a :: as)) = card (a :: as)

Next tactic:
intro inj_on'
theorem card_map_eq_of_inj_on {f : α → β} {as : List α} :
    inj_on f as → card (as.map f) = card as := by
  induction as with
  | nil => simp
  | cons a as ih =>
    cases Decidable.em (f a ∈ map f as) with
    | inl h =>
      intro inj_on'
      cases (exists_of_mem_map h) with
      | intro x hx =>
        have : x = a := inj_on' (mem_cons_of_mem _ hx.1) (mem_cons_self ..) hx.2
        have h1 : a ∈ as := this ▸ hx.1
        have h2 : inj_on f as := inj_on_of_subset inj_on' (subset_cons _ _)
        rw [map, card_cons_of_mem h, ih h2, card_cons_of_mem h1]
    | inr h =>
      intro inj_on'
      

Proof state:
case cons.inr
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
a : α
as : List α
ih : inj_on f as → card (map f as) = card as
h : ¬f a ∈ map f as
inj_on' : inj_on f (a :: as)
⊢ card (map f (a :: as)) = card (a :: as)

Next tactic:
have h1 : a ∉ as := fun h'' ↦ h (mem_map_of_mem _ h'')
theorem card_map_eq_of_inj_on {f : α → β} {as : List α} :
    inj_on f as → card (as.map f) = card as := by
  induction as with
  | nil => simp
  | cons a as ih =>
    cases Decidable.em (f a ∈ map f as) with
    | inl h =>
      intro inj_on'
      cases (exists_of_mem_map h) with
      | intro x hx =>
        have : x = a := inj_on' (mem_cons_of_mem _ hx.1) (mem_cons_self ..) hx.2
        have h1 : a ∈ as := this ▸ hx.1
        have h2 : inj_on f as := inj_on_of_subset inj_on' (subset_cons _ _)
        rw [map, card_cons_of_mem h, ih h2, card_cons_of_mem h1]
    | inr h =>
      intro inj_on'
      have h1 : a ∉ as := fun h'' ↦ h (mem_map_of_mem _ h'')
      

Proof state:
case cons.inr
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
a : α
as : List α
ih : inj_on f as → card (map f as) = card as
h : ¬f a ∈ map f as
inj_on' : inj_on f (a :: as)
h1 : ¬a ∈ as
⊢ card (map f (a :: as)) = card (a :: as)

Next tactic:
have h2 : inj_on f as := inj_on_of_subset inj_on' (subset_cons _ _)
theorem card_map_eq_of_inj_on {f : α → β} {as : List α} :
    inj_on f as → card (as.map f) = card as := by
  induction as with
  | nil => simp
  | cons a as ih =>
    cases Decidable.em (f a ∈ map f as) with
    | inl h =>
      intro inj_on'
      cases (exists_of_mem_map h) with
      | intro x hx =>
        have : x = a := inj_on' (mem_cons_of_mem _ hx.1) (mem_cons_self ..) hx.2
        have h1 : a ∈ as := this ▸ hx.1
        have h2 : inj_on f as := inj_on_of_subset inj_on' (subset_cons _ _)
        rw [map, card_cons_of_mem h, ih h2, card_cons_of_mem h1]
    | inr h =>
      intro inj_on'
      have h1 : a ∉ as := fun h'' ↦ h (mem_map_of_mem _ h'')
      have h2 : inj_on f as := inj_on_of_subset inj_on' (subset_cons _ _)
      

Proof state:
case cons.inr
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
a : α
as : List α
ih : inj_on f as → card (map f as) = card as
h : ¬f a ∈ map f as
inj_on' : inj_on f (a :: as)
h1 : ¬a ∈ as
h2 : inj_on f as
⊢ card (map f (a :: as)) = card (a :: as)

Next tactic:
rw [map, card_cons_of_not_mem h, card_cons_of_not_mem h1, ih h2]
theorem card_append_disjoint : ∀ {as bs : List α},
    Disjoint as bs → card (as ++ bs) = card as + card bs
  | [], _, _ => by 

Proof state:
α : Type u_1
β : Sort ?u.29549
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
x✝¹ : List α
x✝ : Disjoint [] x✝¹
⊢ card ([] ++ x✝¹) = card [] + card x✝¹

Next tactic:
simp
theorem card_append_disjoint : ∀ {as bs : List α},
    Disjoint as bs → card (as ++ bs) = card as + card bs
  | [], _, _ => by simp
  | a :: as, bs, disj => by
    

Proof state:
α : Type u_1
β : Sort ?u.29549
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
disj : Disjoint (a :: as) bs
⊢ card (a :: as ++ bs) = card (a :: as) + card bs

Next tactic:
have disj' : Disjoint as bs := fun _ h1 h2 ↦ disj (mem_cons_of_mem a h1) h2
theorem card_append_disjoint : ∀ {as bs : List α},
    Disjoint as bs → card (as ++ bs) = card as + card bs
  | [], _, _ => by simp
  | a :: as, bs, disj => by
    have disj' : Disjoint as bs := fun _ h1 h2 ↦ disj (mem_cons_of_mem a h1) h2
    

Proof state:
α : Type u_1
β : Sort ?u.29549
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
disj : Disjoint (a :: as) bs
disj' : Disjoint as bs
⊢ card (a :: as ++ bs) = card (a :: as) + card bs

Next tactic:
cases Decidable.em (a ∈ as) with
    | inl h =>
      simp [h, card_append_disjoint disj']
    | inr h =>
      have h1 : a ∉ bs := fun h' ↦ disj (mem_cons_self a as) h'
      simp only [cons_append, mem_append, h, h1, or_self, not_false_eq_true, card_cons_of_not_mem,
        card_append_disjoint disj']
      rw [Nat.add_right_comm]
theorem card_append_disjoint : ∀ {as bs : List α},
    Disjoint as bs → card (as ++ bs) = card as + card bs
  | [], _, _ => by simp
  | a :: as, bs, disj => by
    have disj' : Disjoint as bs := fun _ h1 h2 ↦ disj (mem_cons_of_mem a h1) h2
    

Proof state:
α : Type u_1
β : Sort ?u.29549
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
disj : Disjoint (a :: as) bs
disj' : Disjoint as bs
x✝ : a ∈ as ∨ ¬a ∈ as
⊢ card (a :: as ++ bs) = card (a :: as) + card bs

Next tactic:
cases Decidable.em (a ∈ as) with
    | inl h =>
      simp [h, card_append_disjoint disj']
    | inr h =>
      have h1 : a ∉ bs := fun h' ↦ disj (mem_cons_self a as) h'
      simp only [cons_append, mem_append, h, h1, or_self, not_false_eq_true, card_cons_of_not_mem,
        card_append_disjoint disj']
      rw [Nat.add_right_comm]
theorem card_append_disjoint : ∀ {as bs : List α},
    Disjoint as bs → card (as ++ bs) = card as + card bs
  | [], _, _ => by simp
  | a :: as, bs, disj => by
    have disj' : Disjoint as bs := fun _ h1 h2 ↦ disj (mem_cons_of_mem a h1) h2
    cases Decidable.em (a ∈ as) with
    

Proof state:
case inl
α : Type u_1
β : Sort ?u.29549
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
disj : Disjoint (a :: as) bs
disj' : Disjoint as bs
h : a ∈ as
⊢ card (a :: as ++ bs) = card (a :: as) + card bs

Next tactic:
| inl h =>
      simp [h, card_append_disjoint disj']
theorem card_append_disjoint : ∀ {as bs : List α},
    Disjoint as bs → card (as ++ bs) = card as + card bs
  | [], _, _ => by simp
  | a :: as, bs, disj => by
    have disj' : Disjoint as bs := fun _ h1 h2 ↦ disj (mem_cons_of_mem a h1) h2
    cases Decidable.em (a ∈ as) with
    | inl h =>
      

Proof state:
case inl
α : Type u_1
β : Sort ?u.29549
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
disj : Disjoint (a :: as) bs
disj' : Disjoint as bs
h : a ∈ as
⊢ card (a :: as ++ bs) = card (a :: as) + card bs

Next tactic:
simp [h, card_append_disjoint disj']
theorem card_append_disjoint : ∀ {as bs : List α},
    Disjoint as bs → card (as ++ bs) = card as + card bs
  | [], _, _ => by simp
  | a :: as, bs, disj => by
    have disj' : Disjoint as bs := fun _ h1 h2 ↦ disj (mem_cons_of_mem a h1) h2
    cases Decidable.em (a ∈ as) with
    | inl h =>
      simp [h, card_append_disjoint disj']
    

Proof state:
case inr
α : Type u_1
β : Sort ?u.29549
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
disj : Disjoint (a :: as) bs
disj' : Disjoint as bs
h : ¬a ∈ as
⊢ card (a :: as ++ bs) = card (a :: as) + card bs

Next tactic:
| inr h =>
      have h1 : a ∉ bs := fun h' ↦ disj (mem_cons_self a as) h'
      simp only [cons_append, mem_append, h, h1, or_self, not_false_eq_true, card_cons_of_not_mem,
        card_append_disjoint disj']
      rw [Nat.add_right_comm]
theorem card_append_disjoint : ∀ {as bs : List α},
    Disjoint as bs → card (as ++ bs) = card as + card bs
  | [], _, _ => by simp
  | a :: as, bs, disj => by
    have disj' : Disjoint as bs := fun _ h1 h2 ↦ disj (mem_cons_of_mem a h1) h2
    cases Decidable.em (a ∈ as) with
    | inl h =>
      simp [h, card_append_disjoint disj']
    | inr h =>
      

Proof state:
case inr
α : Type u_1
β : Sort ?u.29549
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
disj : Disjoint (a :: as) bs
disj' : Disjoint as bs
h : ¬a ∈ as
⊢ card (a :: as ++ bs) = card (a :: as) + card bs

Next tactic:
have h1 : a ∉ bs := fun h' ↦ disj (mem_cons_self a as) h'
theorem card_append_disjoint : ∀ {as bs : List α},
    Disjoint as bs → card (as ++ bs) = card as + card bs
  | [], _, _ => by simp
  | a :: as, bs, disj => by
    have disj' : Disjoint as bs := fun _ h1 h2 ↦ disj (mem_cons_of_mem a h1) h2
    cases Decidable.em (a ∈ as) with
    | inl h =>
      simp [h, card_append_disjoint disj']
    | inr h =>
      have h1 : a ∉ bs := fun h' ↦ disj (mem_cons_self a as) h'
      

Proof state:
case inr
α : Type u_1
β : Sort ?u.29549
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
disj : Disjoint (a :: as) bs
disj' : Disjoint as bs
h : ¬a ∈ as
h1 : ¬a ∈ bs
⊢ card (a :: as ++ bs) = card (a :: as) + card bs

Next tactic:
simp only [cons_append, mem_append, h, h1, or_self, not_false_eq_true, card_cons_of_not_mem,
        card_append_disjoint disj']
theorem card_append_disjoint : ∀ {as bs : List α},
    Disjoint as bs → card (as ++ bs) = card as + card bs
  | [], _, _ => by simp
  | a :: as, bs, disj => by
    have disj' : Disjoint as bs := fun _ h1 h2 ↦ disj (mem_cons_of_mem a h1) h2
    cases Decidable.em (a ∈ as) with
    | inl h =>
      simp [h, card_append_disjoint disj']
    | inr h =>
      have h1 : a ∉ bs := fun h' ↦ disj (mem_cons_self a as) h'
      simp only [cons_append, mem_append, h, h1, or_self, not_false_eq_true, card_cons_of_not_mem,
        card_append_disjoint disj']
      

Proof state:
case inr
α : Type u_1
β : Sort ?u.29549
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
a : α
as bs : List α
disj : Disjoint (a :: as) bs
disj' : Disjoint as bs
h : ¬a ∈ as
h1 : ¬a ∈ bs
⊢ card as + card bs + 1 = card as + 1 + card bs

Next tactic:
rw [Nat.add_right_comm]
theorem card_union_disjoint {as bs : List α} (h : Disjoint as bs) :
    card (as ∪ bs) = card as + card bs := by
  

Proof state:
α : Type u_1
β : Sort ?u.32241
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
as bs : List α
h : Disjoint as bs
⊢ card (as ∪ bs) = card as + card bs

Next tactic:
rw [card_eq_of_equiv (union_equiv_append as bs), card_append_disjoint h]
theorem bounded_below (coercive : IsCoercive B) : ∃ C, 0 < C ∧ ∀ v, C * ‖v‖ ≤ ‖B♯ v‖ := by
  

Proof state:
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
coercive : IsCoercive B
⊢ ∃ C, 0 < C ∧ ∀ (v : V), C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖

Next tactic:
rcases coercive with ⟨C, C_ge_0, coercivity⟩
theorem bounded_below (coercive : IsCoercive B) : ∃ C, 0 < C ∧ ∀ v, C * ‖v‖ ≤ ‖B♯ v‖ := by
  rcases coercive with ⟨C, C_ge_0, coercivity⟩
  

Proof state:
case intro.intro
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
C : ℝ
C_ge_0 : 0 < C
coercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ (B u) u
⊢ ∃ C, 0 < C ∧ ∀ (v : V), C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖

Next tactic:
refine' ⟨C, C_ge_0, _⟩
theorem bounded_below (coercive : IsCoercive B) : ∃ C, 0 < C ∧ ∀ v, C * ‖v‖ ≤ ‖B♯ v‖ := by
  rcases coercive with ⟨C, C_ge_0, coercivity⟩
  refine' ⟨C, C_ge_0, _⟩
  

Proof state:
case intro.intro
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
C : ℝ
C_ge_0 : 0 < C
coercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ (B u) u
⊢ ∀ (v : V), C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖

Next tactic:
intro v
theorem bounded_below (coercive : IsCoercive B) : ∃ C, 0 < C ∧ ∀ v, C * ‖v‖ ≤ ‖B♯ v‖ := by
  rcases coercive with ⟨C, C_ge_0, coercivity⟩
  refine' ⟨C, C_ge_0, _⟩
  intro v
  

Proof state:
case intro.intro
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
C : ℝ
C_ge_0 : 0 < C
coercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ (B u) u
v : V
⊢ C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖

Next tactic:
by_cases h : 0 < ‖v‖
theorem bounded_below (coercive : IsCoercive B) : ∃ C, 0 < C ∧ ∀ v, C * ‖v‖ ≤ ‖B♯ v‖ := by
  rcases coercive with ⟨C, C_ge_0, coercivity⟩
  refine' ⟨C, C_ge_0, _⟩
  intro v
  by_cases h : 0 < ‖v‖
  · 

Proof state:
case pos
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
C : ℝ
C_ge_0 : 0 < C
coercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ (B u) u
v : V
h : 0 < ‖v‖
⊢ C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖

Next tactic:
refine' (mul_le_mul_right h).mp _
theorem bounded_below (coercive : IsCoercive B) : ∃ C, 0 < C ∧ ∀ v, C * ‖v‖ ≤ ‖B♯ v‖ := by
  rcases coercive with ⟨C, C_ge_0, coercivity⟩
  refine' ⟨C, C_ge_0, _⟩
  intro v
  by_cases h : 0 < ‖v‖
  · refine' (mul_le_mul_right h).mp _
    

Proof state:
case pos
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
C : ℝ
C_ge_0 : 0 < C
coercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ (B u) u
v : V
h : 0 < ‖v‖
⊢ C * ‖v‖ * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖ * ‖v‖

Next tactic:
calc
      C * ‖v‖ * ‖v‖ ≤ B v v := coercivity v
      _ = ⟪B♯ v, v⟫_ℝ := (continuousLinearMapOfBilin_apply B v v).symm
      _ ≤ ‖B♯ v‖ * ‖v‖ := real_inner_le_norm (B♯ v) v
theorem bounded_below (coercive : IsCoercive B) : ∃ C, 0 < C ∧ ∀ v, C * ‖v‖ ≤ ‖B♯ v‖ := by
  rcases coercive with ⟨C, C_ge_0, coercivity⟩
  refine' ⟨C, C_ge_0, _⟩
  intro v
  by_cases h : 0 < ‖v‖
  · refine' (mul_le_mul_right h).mp _
    calc
      C * ‖v‖ * ‖v‖ ≤ B v v := coercivity v
      _ = ⟪B♯ v, v⟫_ℝ := (continuousLinearMapOfBilin_apply B v v).symm
      _ ≤ ‖B♯ v‖ * ‖v‖ := real_inner_le_norm (B♯ v) v
  · 

Proof state:
case neg
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
C : ℝ
C_ge_0 : 0 < C
coercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ (B u) u
v : V
h : ¬0 < ‖v‖
⊢ C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖

Next tactic:
have : v = 0 := by simpa using h
theorem bounded_below (coercive : IsCoercive B) : ∃ C, 0 < C ∧ ∀ v, C * ‖v‖ ≤ ‖B♯ v‖ := by
  rcases coercive with ⟨C, C_ge_0, coercivity⟩
  refine' ⟨C, C_ge_0, _⟩
  intro v
  by_cases h : 0 < ‖v‖
  · refine' (mul_le_mul_right h).mp _
    calc
      C * ‖v‖ * ‖v‖ ≤ B v v := coercivity v
      _ = ⟪B♯ v, v⟫_ℝ := (continuousLinearMapOfBilin_apply B v v).symm
      _ ≤ ‖B♯ v‖ * ‖v‖ := real_inner_le_norm (B♯ v) v
  · have : v = 0 := by 

Proof state:
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
C : ℝ
C_ge_0 : 0 < C
coercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ (B u) u
v : V
h : ¬0 < ‖v‖
⊢ v = 0

Next tactic:
simpa using h
theorem bounded_below (coercive : IsCoercive B) : ∃ C, 0 < C ∧ ∀ v, C * ‖v‖ ≤ ‖B♯ v‖ := by
  rcases coercive with ⟨C, C_ge_0, coercivity⟩
  refine' ⟨C, C_ge_0, _⟩
  intro v
  by_cases h : 0 < ‖v‖
  · refine' (mul_le_mul_right h).mp _
    calc
      C * ‖v‖ * ‖v‖ ≤ B v v := coercivity v
      _ = ⟪B♯ v, v⟫_ℝ := (continuousLinearMapOfBilin_apply B v v).symm
      _ ≤ ‖B♯ v‖ * ‖v‖ := real_inner_le_norm (B♯ v) v
  · have : v = 0 := by simpa using h
    

Proof state:
case neg
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
C : ℝ
C_ge_0 : 0 < C
coercivity : ∀ (u : V), C * ‖u‖ * ‖u‖ ≤ (B u) u
v : V
h : ¬0 < ‖v‖
this : v = 0
⊢ C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖

Next tactic:
simp [this]
theorem antilipschitz (coercive : IsCoercive B) : ∃ C : ℝ≥0, 0 < C ∧ AntilipschitzWith C B♯ := by
  

Proof state:
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
coercive : IsCoercive B
⊢ ∃ C, 0 < C ∧ AntilipschitzWith C ⇑(continuousLinearMapOfBilin B)

Next tactic:
rcases coercive.bounded_below with ⟨C, C_pos, below_bound⟩
theorem antilipschitz (coercive : IsCoercive B) : ∃ C : ℝ≥0, 0 < C ∧ AntilipschitzWith C B♯ := by
  rcases coercive.bounded_below with ⟨C, C_pos, below_bound⟩
  

Proof state:
case intro.intro
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
coercive : IsCoercive B
C : ℝ
C_pos : 0 < C
below_bound : ∀ (v : V), C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖
⊢ ∃ C, 0 < C ∧ AntilipschitzWith C ⇑(continuousLinearMapOfBilin B)

Next tactic:
refine' ⟨C⁻¹.toNNReal, Real.toNNReal_pos.mpr (inv_pos.mpr C_pos), _⟩
theorem antilipschitz (coercive : IsCoercive B) : ∃ C : ℝ≥0, 0 < C ∧ AntilipschitzWith C B♯ := by
  rcases coercive.bounded_below with ⟨C, C_pos, below_bound⟩
  refine' ⟨C⁻¹.toNNReal, Real.toNNReal_pos.mpr (inv_pos.mpr C_pos), _⟩
  

Proof state:
case intro.intro
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
coercive : IsCoercive B
C : ℝ
C_pos : 0 < C
below_bound : ∀ (v : V), C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖
⊢ AntilipschitzWith (Real.toNNReal C⁻¹) ⇑(continuousLinearMapOfBilin B)

Next tactic:
refine' ContinuousLinearMap.antilipschitz_of_bound B♯ _
theorem antilipschitz (coercive : IsCoercive B) : ∃ C : ℝ≥0, 0 < C ∧ AntilipschitzWith C B♯ := by
  rcases coercive.bounded_below with ⟨C, C_pos, below_bound⟩
  refine' ⟨C⁻¹.toNNReal, Real.toNNReal_pos.mpr (inv_pos.mpr C_pos), _⟩
  refine' ContinuousLinearMap.antilipschitz_of_bound B♯ _
  

Proof state:
case intro.intro
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
coercive : IsCoercive B
C : ℝ
C_pos : 0 < C
below_bound : ∀ (v : V), C * ‖v‖ ≤ ‖(continuousLinearMapOfBilin B) v‖
⊢ ∀ (x : V), ‖x‖ ≤ ↑(Real.toNNReal C⁻¹) * ‖(continuousLinearMapOfBilin B) x‖

Next tactic:
simp_rw [Real.coe_toNNReal', max_eq_left_of_lt (inv_pos.mpr C_pos), ←
    inv_mul_le_iff (inv_pos.mpr C_pos)]