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
315e66d2
Commit
315e66d2
authored
4 years ago
by
gabrielhdt
Browse files
Options
Downloads
Patches
Plain Diff
booleans and lazy reductions
parent
eacec5e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
encodings/lazy.lp
+36
-0
36 additions, 0 deletions
encodings/lazy.lp
with
36 additions
and
0 deletions
encodings/lazy.lp
0 → 100644
+
36
−
0
View file @
315e66d2
require open
personoj.encodings.lhol
personoj.encodings.pvs_cert
symbol or: Bool ⇒ Bool ⇒ Bool
symbol {|and|}: Bool ⇒ Bool ⇒ Bool
definition false ≔ forall {bool} (λx, x)
definition true ≔ impd {false} (λ_, false)
definition imp P Q ≔ impd {P} (λ_, Q)
definition bnot P ≔ impd {P} (λ_, false)
definition band P Q ≔ bnot (imp P (bnot Q))
definition bor P Q ≔ imp (bnot P) Q
set prefix 5 "¬" ≔ bnot
set infix 6 "∧" ≔ band
set infix 5 "∨" ≔ bor
definition biff P Q ≔ (imp P Q) ∧ (imp Q P)
set infix 7 "⇔" ≔ biff
definition when P Q ≔ imp Q P
set builtin "bot" ≔ false
set builtin "top" ≔ true
set builtin "imp" ≔ imp
set builtin "not" ≔ bnot
set builtin "and" ≔ band
set builtin "or" ≔ bor
// Lazy reduction rules
rule or true → λ_, true
rule or false → λx, x
rule {|and|} true → λx, x
rule {|and|} false → λ_, false
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