Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pierre Letouzey
natded
Commits
ec7f8f1e
Commit
ec7f8f1e
authored
Oct 13, 2020
by
Pierre Letouzey
Browse files
aggressive notations, again
parent
f7734088
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
Nam.v
Nam.v
+7
-4
No files found.
Nam.v
View file @
ec7f8f1e
...
...
@@ -169,9 +169,13 @@ Notation "∃ x , A" := (Quant Ex x A)
Definition test_form := (∃ "
x
", True <-> Pred "
p
" [Var "
x
";#3])%form.
Module AggressiveNotations.
Local Notation "
x
=
y
" := (Pred "
=
" (@cons term x [y])) : formula_scope.
Local Open Scope form.
(* explicit types in lists, otherwise coercions won't work well later *)
Local Notation "
x
=
y
" :=
(Pred "
=
" (@cons term x (@cons term y []))) : formula_scope.
Local Notation "
x
<>
y
" := (~ (x = y)) : formula_scope.
Local Notation O := (Fun "
O
" []).
Defini
tion S x := (Fun "
S
"
[x]
).
Local Nota
tion S x := (Fun "
S
"
(@cons term x [])
).
Definition idvar (x:string) : variable := x.
Local Coercion idvar : string >-> variable.
Local Coercion Var : variable >-> term.
...
...
@@ -180,8 +184,7 @@ Definition pred_form :=
(Op Impl (Not (Pred "
=
" [Var "
x
"; Fun "
O
" []]))
(Quant Ex "
y
" (Pred "
=
" [Var "
x
"; Fun "
S
" [Var "
y
"]]))).
Print pred_form.
Definition pred_form_bis :=
(∀ "
x
", ~ "
x
" = O -> ∃ "
y
", "
x
" = S "
y
")%form.
Definition pred_form_bis := ∀ "
x
", O <> "
x
" -> ∃ "
y
", "
x
" = S "
y
".
End AggressiveNotations.
(** Formula printing *)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment