Zulip Chat Archive

Stream: maths

Topic: How can do "rcases" on a (not computable?) exists statement


Kent Van Vels (Aug 30 2022 at 02:56):

I am trying to show that the termwise product of two Cauchy sequences of ratioanl numbers is a Cauchy sequence. A standard part of the proof is a lemma that a Cauchy sequence is bounded, i.e. there exists a constant MQM\in \mathbb{Q} such that for all nNn\in \mathbb{N} we have unM|u_n| \le M. I can do this part fine. But I can't the extract the upper bound using rcases or anything else I have tried. What follows is my Minimal (non) Working example.

import tactic
abbreviation seqQ :=    

def isCauchy : seqQ  Prop :=
begin
  intro u,
  exact ( (ε : ) (ε_pos : 0 < ε),  N : ,  (n  N) (m  N), abs (u n - u m)  ε )
end

namespace cauchyQ

lemma cauchy_sequences_bounded (u0 : seqQ) (h1 : isCauchy u0) :
  (M : ),  n : , |u0 n|  M := sorry

structure cauchyQ :=
mk :: (z : seqQ) (h1 : isCauchy z)

protected def mul : cauchyQ  cauchyQ   cauchyQ :=
begin
  rintros az,ha bz,hb⟩,
  have hMA := (cauchy_sequences_bounded az ha),
  --I want to exact the maximum in the next line and use.
  --I suspect it won't let me because the upper_bound isn't computable,
--but I don't really know.
  rcases hMA with upper_bound_of_az, hMA⟩,
end

end cauchyQ

I appreciate any help.

Mario Carneiro (Aug 30 2022 at 03:11):

You should construct the sequence before extracting the max

Mario Carneiro (Aug 30 2022 at 03:11):

you can use rcases to extract the max only in the proof of isCauchy

Kent Van Vels (Aug 30 2022 at 03:14):

Ok, i think i found a previous conversation that also ran into this. I will report back. I think I understand it.

Kent Van Vels (Aug 30 2022 at 03:19):

It is working. I really appreciate the help.


Last updated: Dec 20 2023 at 11:08 UTC