Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lisa
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
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LARA
lisa
Merge requests
!53
Front integration
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Front integration
github/fork/SimonGuilloud/front-integration
into
front-integration
Overview
0
Commits
54
Pipelines
0
Changes
1
Merged
Viktor Kuncak
requested to merge
github/fork/SimonGuilloud/front-integration
into
front-integration
2 years ago
Overview
0
Commits
54
Pipelines
0
Changes
1
Expand
Created by: SimonGuilloud
0
0
Merge request reports
Viewing commit
db5131ab
Prev
Next
Show latest version
1 file
+
40
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
db5131ab
Create a running theory with Peano axioms
· db5131ab
Ekaterina Goltsova
authored
2 years ago
src/main/scala/lisa/proven/mathematics/Peano.scala
0 → 100644
+
40
−
0
Options
package
lisa.proven.mathematics
import
lisa.utils.Helpers.
{
given
,
*}
import
lisa.kernel.fol.FOL.
*
import
lisa.kernel.proof.RunningTheory
object
Peano
{
type
Axiom
=
Formula
final
val
(
x
,
y
)
=
(
VariableLabel
(
"x"
),
VariableLabel
(
"y"
))
final
val
zero
:
Term
=
ConstantFunctionLabel
(
"0"
,
0
)()
final
val
s
=
ConstantFunctionLabel
(
"S"
,
1
)
final
val
plus
=
ConstantFunctionLabel
(
"+"
,
2
)
final
val
times
=
ConstantFunctionLabel
(
"*"
,
2
)
final
val
sPhi
:
SchematicPredicateLabel
=
SchematicPredicateLabel
(
"?p"
,
1
)
final
val
ax1ZeroSuccessor
:
Axiom
=
forall
(
x
,
!(
s
(
x
)
===
zero
))
final
val
ax2Injectivity
:
Axiom
=
forall
(
x
,
forall
(
y
,
(
s
(
x
)
===
s
(
y
))
==>
(
x
===
y
)))
final
val
ax3neutral
:
Axiom
=
forall
(
x
,
plus
(
x
,
zero
)
===
x
)
final
val
ax4plus
:
Axiom
=
forall
(
x
,
forall
(
y
,
plus
(
x
,
s
(
y
))
===
s
(
plus
(
x
,
y
))))
final
val
ax5
:
Axiom
=
forall
(
x
,
times
(
x
,
zero
)
===
zero
)
final
val
ax6
:
Axiom
=
forall
(
x
,
forall
(
y
,
times
(
x
,
s
(
y
))
===
plus
(
times
(
x
,
y
),
x
)))
final
val
ax7induction
:
Axiom
=
(
sPhi
(
zero
)
/\
forall
(
x
,
sPhi
(
x
)
==>
sPhi
(
s
(
x
))))
==>
forall
(
x
,
sPhi
(
x
))
final
val
runningPeanoTheory
:
RunningTheory
=
new
RunningTheory
()
final
val
functions
:
Set
[
ConstantFunctionLabel
]
=
Set
(
ConstantFunctionLabel
(
"0"
,
0
),
s
,
plus
,
times
)
functions
.
foreach
(
runningPeanoTheory
.
addSymbol
(
_
))
private
val
peanoAxioms
:
Set
[(
String
,
Axiom
)]
=
Set
(
(
"A1"
,
ax1ZeroSuccessor
),
(
"A2"
,
ax2Injectivity
),
(
"A3"
,
ax3neutral
),
(
"A4"
,
ax4plus
),
(
"A5"
,
ax5
),
(
"A6"
,
ax6
),
(
"Induction"
,
ax7induction
)
)
peanoAxioms
.
foreach
(
a
=>
runningPeanoTheory
.
addAxiom
(
a
.
_1
,
a
.
_2
))
}
Loading