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
f57f9646
Commit
f57f9646
authored
4 years ago
by
gabrielhdt
Browse files
Options
Downloads
Patches
Plain Diff
boolops tests
parent
f6bd1bbf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
encodings/boolops_if.lp
+14
-0
14 additions, 0 deletions
encodings/boolops_if.lp
encodings/boolops_imp.lp
+22
-0
22 additions, 0 deletions
encodings/boolops_imp.lp
sandbox/boolops.lp
+25
-0
25 additions, 0 deletions
sandbox/boolops.lp
with
61 additions
and
0 deletions
encodings/boolops_if.lp
0 → 100644
+
14
−
0
View file @
f57f9646
// Boolean operators defined from if.
require open
personoj.encodings.lhol
personoj.encodings.pvs_cert
personoj.encodings.booleans
personoj.encodings.if
// Definition of logical connectors with if3
definition band p q ≔ if {bool} p q (λ_, false)
definition bor p q ≔ if {bool} p (λ_, true) q
definition imp p q ≔ if {bool} p q (λ_, true)
set infix left 7 "∧" ≔ band
set infix left 6 "∧" ≔ bor
set infix left 5 "⊃" ≔ imp
This diff is collapsed.
Click to expand it.
encodings/boolops_imp.lp
0 → 100644
+
22
−
0
View file @
f57f9646
// Boolean operators defined from dependent implication.
require open
personoj.encodings.lhol
personoj.encodings.pvs_cert
personoj.encodings.booleans
definition imp P Q ≔ impd {P} (λ_, Q)
set infix 4 "⊃" ≔ imp
definition band P Q ≔ ¬ (P ⊃ (¬ Q))
definition bor P Q ≔ (¬ P) ⊃ Q
set infix 6 "∧" ≔ band
set infix 5 "∨" ≔ bor
definition biff P Q ≔ (P ⊃ Q) ∧ (Q ⊃ P)
set infix 7 "⇔" ≔ biff
definition when P Q ≔ Q ⊃ P
set builtin "imp" ≔ imp
set builtin "and" ≔ band
set builtin "or" ≔ bor
This diff is collapsed.
Click to expand it.
sandbox/boolops.lp
0 → 100644
+
25
−
0
View file @
f57f9646
// Compute the term [⊥ ⊃ 1 / 0 = 1 / 0]. The principle is that [1/0] is well
// typed because in the right part of the implication, false is assumed.
require open personoj.encodings.lhol
require open personoj.encodings.pvs_cert
require open personoj.encodings.equality
require open personoj.encodings.booleans
symbol imp: ∀P: Bool, (ε P ⇒ η bool) ⇒ η bool
set infix left 6 "⊃" ≔ imp
require personoj.paper.rat as Q
set builtin "0" ≔ Q.Z
set builtin "+1" ≔ Q.S
theorem zisnotz (h: ε false): ε (Q.{|nznat?|} 0)
proof
assume Hf _
refine Hf
qed
// Computes ⊥ ⊃ (1 / 0) = 1 / 0
compute false ⊃ (λh,
let ooz ≔ Q.div 1 (pair 0 (zisnotz h)) in
eq ooz ooz)
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