Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
personoj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
koizel
personoj
Commits
3ef53c82
Commit
3ef53c82
authored
4 years ago
by
gabrielhdt
Browse files
Options
Downloads
Patches
Plain Diff
new encodings of booleans, two ways
parent
f57f9646
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
encodings/bool_hol.lp
+27
-0
27 additions, 0 deletions
encodings/bool_hol.lp
encodings/bool_pvs.lp
+31
-0
31 additions, 0 deletions
encodings/bool_pvs.lp
encodings/boolops_if.lp
+4
-5
4 additions, 5 deletions
encodings/boolops_if.lp
sandbox/boolops_if.lp
+9
-0
9 additions, 0 deletions
sandbox/boolops_if.lp
with
71 additions
and
5 deletions
encodings/bool_hol.lp
0 → 100644
+
27
−
0
View file @
3ef53c82
// Definition based on implication
require open personoj.encodings.lhol
require open personoj.encodings.pvs_cert
definition false ≔ forall {bool} (λx, x)
definition true ≔ impd {false} (λ_, false)
definition not P ≔ impd {P} (λ_, false)
set prefix 5 "¬" ≔ not
definition imp P Q ≔ impd {P} Q
set infix 2 "⊃" ≔ imp
definition {|and|} P Q ≔ ¬ (P ⊃ (λh, ¬ (Q h)))
set infix 4 "∧" ≔ {|and|}
definition or P Q ≔ (¬ P) ⊃ Q
set infix 3 "∨" ≔ or
set builtin "bot" ≔ false
set builtin "top" ≔ true
set builtin "not" ≔ not
set builtin "imp" ≔ imp
set builtin "and" ≔ {|and|}
set builtin "or" ≔ or
symbol if {s: Set} p: (ε p ⇒ η s) ⇒ (ε (¬ p) ⇒ η s) ⇒ η s
rule if {bool} &p &then &else → (&p ⊃ &then) ⊃ (λ_, ¬ &p ⊃ &else)
This diff is collapsed.
Click to expand it.
encodings/bool_pvs.lp
0 → 100644
+
31
−
0
View file @
3ef53c82
// Close to PVS logic system: native equality,
// true, false, and if
require open personoj.encodings.lhol
require open personoj.encodings.pvs_cert
definition false ≔ forall {bool} (λx, x)
definition true ≔ impd {false} (λ_, false)
symbol eq {s: Set}: η s ⇒ η s ⇒ η bool
set infix left 6 "=" ≔ eq
definition not p ≔ eq {bool} p false
set prefix 5 "¬" ≔ not
constant symbol if {s: Set} p: (ε p ⇒ η s) ⇒ (ε (¬ p) ⇒ η s) ⇒ η s
rule ε (if &p &then &else)
→ (∀h: ε &p, ε (&then h)) ⇒ ∀h: ε (¬ &p), ε (&else h)
definition {|and|} p q ≔ if {bool} p q (λ_, false)
definition or p q ≔ if {bool} p (λ_, true) q
definition imp p q ≔ if {bool} p q (λ_, true)
set infix left 4 "∧" ≔ {|and|}
set infix left 3 "∨" ≔ or
set infix left 2 "⊃" ≔ imp
set builtin "bot" ≔ false
set builtin "top" ≔ true
set builtin "not" ≔ not
set builtin "imp" ≔ imp
set builtin "and" ≔ {|and|}
set builtin "or" ≔ or
This diff is collapsed.
Click to expand it.
encodings/boolops_if.lp
+
4
−
5
View file @
3ef53c82
// Boolean operators defined from if.
require open
personoj.encodings.lhol
personoj.encodings.pvs_cert
personoj.encodings.booleans
personoj.encodings.if
require open personoj.encodings.lhol
require open personoj.encodings.pvs_cert
require open personoj.encodings.booleans
require open personoj.encodings.if
// Definition of logical connectors with if3
definition band p q ≔ if {bool} p q (λ_, false)
...
...
This diff is collapsed.
Click to expand it.
sandbox/boolops_if.lp
0 → 100644
+
9
−
0
View file @
3ef53c82
require open personoj.encodings.lhol
require open personoj.encodings.pvs_cert
require open personoj.encodings.bool_pvs
theorem trivial (P: η bool): ε (P ⊃ (λ_, P))
proof
assume P
refine λ_ _ f, f
qed
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment