Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[printer] Pp problem #349

Open
ejgallego opened this issue Oct 14, 2023 · 2 comments
Open

[printer] Pp problem #349

ejgallego opened this issue Oct 14, 2023 · 2 comments

Comments

@ejgallego
Copy link
Member

This code by Mukesh Tiwari doesn't print properly:

From Coq Require Import NArith Utf8
    Bool Init.Byte Psatz Strings.Byte. 

Open Scope N_scope.
Definition np_total (np : N):  (np <? 256 = true) ->  byte.
Proof.
  intros H.
  refine(match (np <? 256) as b return ∀ mp, np = mp -> 
      (mp <? 256) = b -> _ with 
   | true => fun mp Hmp Hmpt => 
      match of_N mp as npt return _ = npt -> _ with 
      | Some x => fun _ => x
      | None => fun Hf => _  
      end eq_refl
   | false => fun mp Hmp Hmf => _
  end np eq_refl eq_refl).
  abstract(
  apply of_N_None_iff in Hf;
  apply N.ltb_lt in Hmpt; intuition nia).
  abstract (subst; congruence).
Defined.


Lemma np_true_tmp : forall np (Ha : np <? 256 = true) x, 
  of_N np = Some x -> np_total np Ha = x.
Proof.
  intros * Hb; unfold np_total.
@ejgallego
Copy link
Member Author

ejgallego commented Oct 14, 2023

See coq-community/vscoq#670 for screenshots (tho the second screenshot doesn't reflect how it should print either I think)

@ejgallego
Copy link
Member Author

That's the correct rendering:

Captura de pantalla de 2023-10-14 14-40-41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant