Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Alethe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Analyze
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
veriT
Alethe
Commits
b47721d9
Commit
b47721d9
authored
2 years ago
by
Hans-Jörg
Browse files
Options
Downloads
Patches
Plain Diff
Proof simple subproofs, metaterms, remove tabs
parent
28d75df5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#7259
failed
2 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
spec/doc.tex
+102
-78
102 additions, 78 deletions
spec/doc.tex
with
102 additions
and
78 deletions
spec/doc.tex
+
102
−
78
View file @
b47721d9
...
...
@@ -485,8 +485,8 @@ understand the proof intuitively.
A proof in the Alethe language is an indexed list of steps.
To mimic the concrete syntax we write a step in the form
\begin{plListEq}
c
_
1,
\,\dots
,
\,
c
_
k
&
\proofsep
i.
&
\varphi
_
1,
\dots
,
\varphi
_
l
&
(
\ruleType
{
rule
}
\;
p
_
1,
\,\dots
,
\,
p
_
n)
\,
[a_1,\,\dots,\,a_m]
c
_
1,
\,\dots
,
\,
c
_
k
&
\proofsep
i.
&
\varphi
_
1,
\dots
,
\varphi
_
l
&
(
\ruleType
{
rule
}
\;
p
_
1,
\,\dots
,
\,
p
_
n)
\,
[a_1,\,\dots,\,a_m]
\end{plListEq}
\noindent
Each step has a unique index
\(
i
\in
\mathbb
{
I
}\)
, where
\(
\mathbb
{
I
}\)
is a countable
...
...
@@ -548,8 +548,8 @@ A \proofRule{subproof} step can not use premise from a subproof nested within th
\begin{comment}
{
Mathias Fleury
}
There are two ways to export one element from the subproof:
\begin{itemize}
\item
rely on the order and take the last one
\item
add an explicit :premises in the conclusion stop to give the exported step
\item
rely on the order and take the last one
\item
add an explicit :premises in the conclusion stop to give the exported step
\end{itemize}
\end{comment}
...
...
@@ -640,17 +640,17 @@ In the following a concluding rule is a proof rule that concludes a
subproof (such as
\proofRule
{
subproof
}
and
\proofRule
{
bind
}
).
\begin{definition}
[Calculated Context]
Let
$
s
_
i
$
be a step or anchor in
$
P
$
such that no step
$
s
_
j
$
where
$
j < i
$
uses a concluding
rule. Let
$
a
_
1
,
\dots
, a
_
m
$
be the anchors among
$
s
_
1
,
\dots
, s
_{
i
-
1
}$
.
Let
$
s
_
i
$
be a step or anchor in
$
P
$
such that no step
$
s
_
j
$
where
$
j < i
$
uses a concluding
rule. Let
$
a
_
1
,
\dots
, a
_
m
$
be the anchors among
$
s
_
1
,
\dots
, s
_{
i
-
1
}$
.
The calculated context of
$
s
_
i
$
is the context
$
c
_{
1
,
1
}
,
\dots
, c
_{
1
, n
_
1
}
,
\dots
, c
_{
m,
1
}
,
\dots
, c
_{
m, n
_
m
}$
where
$
c
_{
k,
1
}
,
\dots
, c
_{
k, n
_
k
}$
is the context of
$
a
_
k
$
.
The calculated context of
$
s
_
i
$
is the context
$
c
_{
1
,
1
}
,
\dots
, c
_{
1
, n
_
1
}
,
\dots
, c
_{
m,
1
}
,
\dots
, c
_{
m, n
_
m
}$
where
$
c
_{
k,
1
}
,
\dots
, c
_{
k, n
_
k
}$
is the context of
$
a
_
k
$
.
Note that if
$
s
_
i
$
is an anchor, its calculated context is the
context before concatenating it with the context associated
with
$
s
_
i
$
.
Note that if
$
s
_
i
$
is an anchor, its calculated context is the
context before concatenating it with the context associated
with
$
s
_
i
$
.
\end{definition}
To check the validity of a proof we can inductively eliminate subproofs
...
...
@@ -671,30 +671,28 @@ Of course this is only valid if the steps that are replace do not contain
partial subpoors. Due to our induction, we will only replace entire subproofs that
do not contain subpoof.
\begin{definition}
[Admissible Proof, Pure Subproofs]
Let
$
P
_
i
$
be the proof
$
[
s
_
1
,
\dots
, s
_
n
]
$
and
$
1
\leq
\mathit
{
start
}
<
\mathit
{
end
}
\leq
n
$
such that
\begin{itemize}
\item
$
s
_{
\mathit
{
start
}}$
is an anchor,
\item
$
s
_{
\mathit
{
end
}}$
is a step that uses a concluding rule,
\item
no
$
s
_
k
$
with
$
\mathit
{
start
}
< k <
\mathit
{
end
}$
is an anchor or
a step that uses a concluding rule.
\end{itemize}
The proof
$
P
_
i
$
is
\emph
{
admissible
}
if it either contains no such
$
\mathit
{
start
}$
,
$
\mathit
{
end
}$
, or
\begin{itemize}
\item
all steps
$
s
_
k
$
with
$
\mathit
{
start
}
< k <
\mathit
{
end
}$
only use the premises
$
s
_
l
$
with
$
\mathit
{
start
}
<
l < k
$
,
\item
all steps
$
s
_
k
$
are valid application of their rule under the
calculated context of
$
s
_{
\mathit
{
start
}}$
,
\item
the step
$
s
_{
\mathit
{
end
}}$
is a valid application of its rule
under its calculated context,
\item
the proof
$
P
_{
i
+
1
}$
, where the steps
$
s
_{
\mathit
{
start
}}
,
\dots
,
s
_{
\mathit
{
end
}}$
have been replaced by
$
s'
$
as described above, is admissible.
\end{itemize}
We call the admissible proof
$
[
s
_{
\mathit
{
start
}}
,
\dots
, s
_{
\mathit
{
end
}}
]
$
a
\emph
{
pure
subproof
}
.
\begin{definition}
[Admissible Proof]
Let
$
P
_
i
$
be the proof
$
[
s
_
1
,
\dots
, s
_
n
]
$
and
$
1
\leq
\mathit
{
start
}
<
\mathit
{
end
}
\leq
n
$
such that
\begin{itemize}
\item
$
s
_{
\mathit
{
start
}}$
is an anchor,
\item
$
s
_{
\mathit
{
end
}}$
is a step that uses a concluding rule,
\item
no
$
s
_
k
$
with
$
\mathit
{
start
}
< k <
\mathit
{
end
}$
is an anchor or
a step that uses a concluding rule.
\end{itemize}
The proof
$
P
_
i
$
is
\emph
{
admissible
}
if it either contains no such
$
\mathit
{
start
}$
,
$
\mathit
{
end
}$
, or
\begin{itemize}
\item
all steps
$
s
_
k
$
with
$
\mathit
{
start
}
< k <
\mathit
{
end
}$
only use the premises
$
s
_
l
$
with
$
\mathit
{
start
}
<
l < k
$
,
\item
all steps
$
s
_
k
$
are valid application of their rule under the
calculated context of
$
s
_{
\mathit
{
start
}}$
,
\item
the step
$
s
_{
\mathit
{
end
}}$
is a valid application of its rule
under its calculated context,
\item
the proof
$
P
_{
i
+
1
}$
, where the steps
$
s
_{
\mathit
{
start
}}
,
\dots
,
s
_{
\mathit
{
end
}}$
have been replaced by
$
s'
$
as described above, is admissible.
\end{itemize}
\end{definition}
Since proofs are finite, this process stops at some admissible proof
...
...
@@ -704,19 +702,19 @@ $P_{\mathit{last}}$. Otherwise, we can check $P_{\mathit{last}}$ to
see if the overall proof is valid.
\begin{definition}
[Valid Alethe Proof]
An Alethe proof
$
P
_
0
=
[
s
_
1
,
\dots
, s
_
n
]
$
is valid if
\begin{itemize}
\item
$
P
_
0
$
does not contain any step that uses the
\proofRule
{
hole
}
rule,
\item
each step in
$
P
_
0
$
uses an unique index,
\item
$
P
_
0
$
is admissible,
\item
$
P
_
0
$
contains a step that has the empty clause as its conclusion,
\item
$
P
_{
\mathit
{
last
}}$
does not contain any anchor or step using a concluding
rule,
\item
all steps
$
s
_
k
$
in
$
P
_{
\mathit
{
last
}}$
only use the premises
$
s
_
l
$
with
$
1
\leq
l < k
$
,
\item
all steps in
$
P
_{
\mathit
{
last
}}$
are valid
applications of their rules under the empty context.
\end{itemize}
An Alethe proof
$
P
_
0
=
[
s
_
1
,
\dots
, s
_
n
]
$
is valid if
\begin{itemize}
\item
$
P
_
0
$
does not contain any step that uses the
\proofRule
{
hole
}
rule,
\item
each step in
$
P
_
0
$
uses an unique index,
\item
$
P
_
0
$
is admissible,
\item
$
P
_
0
$
contains a step that has the empty clause as its conclusion,
\item
$
P
_{
\mathit
{
last
}}$
does not contain any anchor or step using a concluding
rule,
\item
all steps
$
s
_
k
$
in
$
P
_{
\mathit
{
last
}}$
only use the premises
$
s
_
l
$
with
$
1
\leq
l < k
$
,
\item
all steps in
$
P
_{
\mathit
{
last
}}$
are valid
applications of their rules under the empty context.
\end{itemize}
\end{definition}
In this document we will often call
$
P
_{
\mathit
{
last
}}$
the outermost
...
...
@@ -725,7 +723,8 @@ proof.
\subsubsection
{
Soundness
}
To show the soundness of a valid Alethe proof
$
P
=
[
s
_
1
,
\dots
, s
_
n
]
$
we can use the same induction as the for the definition of validity.
we can use the same approach as for the definition of validity: consider
subproof free subproofs and then replace subproofs by holes.
\begin{theorem}
[Soundness of Alethe]
If there is a valid Alethe proof
$
P
$
that has the formulas
...
...
@@ -736,28 +735,53 @@ steps in its outermost proof, then
\]
\end{theorem}
We wills start with simple subproofs with
empty contexts and then add
contexts.
We wills start with simple subproofs with
out subproofs and with empty
contexts.
Here, we will assume that every rule is sound.
\begin{lemma}
Let
$
P
=
[
s
_
1
,
\dots
, s
_
n
]
$
be a pure subpoof such that no
$
s
_
i
$
is
an anchor,
$
s
_
n
$
is a
\proofRule
{
subproof
}
step with the conclusion
$
\psi
$
, and
$
\varphi
_
1
,
\dots
,
\varphi
_
m
$
are the conclusion of
\proofRule
{
assume
}
steps. Then
$
\vDash
\varphi
_
1
,
\dots
,
\varphi
_
m
\limp
\psi
$
.
Let
$
P
=
[
s
_{
\mathit
{
start
}}
,
\dots
, s
_{
\mathit
{
end
}}
]
$
be an
admissible proof such that no
$
s
_
i
$
with
$
i>
1
$
is an anchor,
$
s
_{
\mathit
{
end
}$
is a
\proofRule
{
subproof
}
step with the
conclusion
$
\psi
$
, and
$
\varphi
_
1
,
\dots
,
\varphi
_
m
$
are the
conclusion of
\proofRule
{
assume
}
steps. Then
$
\vDash
\varphi
_
1
,
\dots
,
\varphi
_
m
\limp
\psi
$
.
\end{lemma}
\begin{proof}
Let
$
s
_
j
$
be the premise of the step
$
s
_
n
$
. Due to the definition of
\proofRule
{
subproof
}
, this conclusion of
$
s
_
j
$
is
$
\psi
$
. If we can
show that
$
s
_
j
$
means
$
\varphi
_
1
,
\dots
,
\varphi
_
m
\vDash
\psi
$
,
then
$
\vDash
\varphi
_
1
,
\dots
,
\varphi
_
m
\limp
\psi
$
since
\proofRule
{
subproof
}
is sound.
We show this by induction over the proof steps. Let
$
V
_
0
=
\emptyset
$
.
Let
$
\psi
_
i
$
be the conclusions of the step
$
s
_
i
$
. If
$
s
_
i
$
is an
\proofRule
{
assume
}
step, then let
$
V
_
i
=
V
_{
i
-
1
}
\cup
\{\psi
_
i
\}
$
.
Otherwies,
By induction over the proof steps we can show that for each step
$
s
_
i
$
with
the conclusion
$
\psi
_
i
$
it holds that
$
V
_
i
\vDash
\psi
_
i
$
where
$
V
_
i
$
is the set formulas assumed before
$
s
_
i
$
.
Let
$
V
_
0
=
\emptyset
$
.
Let
$
\psi
_
i
$
be the conclusions of the step
$
s
_
i
$
. If
$
s
_
i
$
is an
\proofRule
{
assume
}
step, then let
$
V
_
i
=
V
_{
i
-
1
}
\cup
\{\psi
_
i
\}
$
.
Otherwise, let
$
S
$
be the set of premises of
$
s
_
i
$
and
$
P
$
the set
of the conclusions of the steps in
$
S
$
.
Since
$
s
_
i
$
is a valid application of its rule, we have
$
P
\vDash
\psi
_
i
$
.
Now, for every step
$
s
_
j
\in
S
$
with the conclusion
$
\psi
_
j
\in
P
$
, we
have
$
j < i
$
and
$
V
_
j
\vDash
\psi
_
j
$
due to the induction hypothesis. Since
$
j < i
$
, the
premises
$
V
_
j
$
are a subset of
$
V
_
i
$
and we can weaken
$
V
_
j
\vDash
\psi
_
j
$
to
$
V
_
i
\vDash
\psi
_
j
$
. Consequently,
$
V
_
i
\vDash
\psi
_
i
$
.
This process ends when
$
s
_{
\mathit
{
end
}}$
is reached and we
get
$
\varphi
_
1
,
\dots
,
\varphi
_
n
\vDash
\psi
$
and by definition of
\proofRule
{
subproof
}
$
\vDash
\varphi
_
1
,
\dots
,
\varphi
_
m
\limp
\psi
$
.
\end{proof}
To clarify the subproofs with contexts, we translate the contexts into
$
\lambda
$
-terms. For a deeper description of this approach see the
publication that introduced this approach~
\cite
{
barbosa-2019
}
.
These
$
\lambda
$
-terms are called
\emph
{
metaterms
}
\begin{definition}
[Metaterm]
Metaterms are expressions constructed by the grammar
\[
M
\,
::
=
\,
\boxed
{
t
}
\,\mid\,
\lambda
x.
\,
M
\,\mid\,
(
\lambda
\bar
{
x
}_
n.
\,
M
)
\,\bar
{
t
}_
n
\]
\end{definition}
\subsubsection
{
Abstract Inference System
}
% or Rules, or Rules of Inference
\label
{
sec:inference-system
}
Most of the content is taken from the presentation and the correctness proof of
...
...
@@ -1250,22 +1274,22 @@ remove the steps of the subproof from memory after checking it.
There is an open question with regard to the best way to print
subproofs:
There is an implicit relation between the last step of the subproof
There is an implicit relation between the last step of the subproof
and the step concluding the subproof.
{
\textrightarrow
}
what if we would, for some reason, have some crap after the last step
of the subproof? We cannot accommodate this yet.
There are multiple solutions to solve this implicit dependency.
There are multiple solutions to solve this implicit dependency.
{
\textbullet
}
One is to
give the final step of the subproof as a premise to the step concluding
the subproof.
{
\textrightarrow
}
downside: normally it's forbidden to use steps from within a deeper proof
{
\textbullet
}
One is to
give the final step of the subproof as a premise to the step concluding
the subproof.
{
\textrightarrow
}
downside: normally it's forbidden to use steps from within a deeper proof
{
\textbullet
}
We could have the conclusion of the subproof already in the anchor.
or we could turn the current structure upside down
{
\textrightarrow
}
downside: a solver that just dumps out steps can not no always know
the conclusion when opening a subproof. For example, when simplifications are applied.
{
\textbullet
}
We could have the conclusion of the subproof already in the anchor.
or we could turn the current structure upside down
{
\textrightarrow
}
downside: a solver that just dumps out steps can not no always know
the conclusion when opening a subproof. For example, when simplifications are applied.
\end{comment}
\subsection*
{
Sharing and Skolem Terms
}
...
...
@@ -1492,7 +1516,7 @@ f(t_1, \dots, t_n) \simeq f(u_1, \dots, u_n)\) \\
P
(
t
_
1
,
\dots
, t
_
n
)
\simeq
P
(
u
_
1
,
\dots
, u
_
n
)
\)
\\
\ruleref
{
qnt
_
cnf
}
&
Clausification of a quantified formula.
\\
\ruleref
{
and
_
pos
}
&
\(
\neg
(
\varphi
_
1
\land
\dots
\land
\varphi
_
n
)
,
\varphi
_
k
\)
\\
\ruleref
{
and
_
neg
}
&
\(
(
\varphi
_
1
\land
\dots
\land
\varphi
_
n
)
,
\neg\varphi
_
1
,
\dots
,
\neg\varphi
_
n
\)
\\
\ruleref
{
and
_
neg
}
&
\(
(
\varphi
_
1
\land
\dots
\land
\varphi
_
n
)
,
\neg\varphi
_
1
,
\dots
,
\neg\varphi
_
n
\)
\\
\ruleref
{
or
_
pos
}
&
\(
\neg
(
\varphi
_
1
\lor
\dots
\lor
\varphi
_
n
)
,
\varphi
_
1
,
\dots
,
\varphi
_
n
\)
\\
\ruleref
{
or
_
neg
}
&
\(
(
\varphi
_
1
\lor
\dots
\lor
\varphi
_
n
)
,
\neg
\varphi
_
k
\)
\\
\ruleref
{
xor
_
pos1
}
&
\(
\neg
(
\varphi
_
1
\operatorname
{
xor
}
\varphi
_
2
)
,
\varphi
_
1
,
\varphi
_
2
\)
\\
...
...
@@ -1610,7 +1634,7 @@ Rule & Description \\
\ruleref
{
and
_
pos
}
&
\(
\neg
(
\varphi
_
1
\land
\dots
\land
\varphi
_
n
)
,
\varphi
_
k
\)
\\
\ruleref
{
and
_
neg
}
&
\(
(
\varphi
_
1
\land
\dots
\land
\varphi
_
n
)
,
\neg\varphi
_
1
,
\dots
,
\neg\varphi
_
n
\)
\\
\ruleref
{
or
_
pos
}
&
\(
\neg
(
\varphi
_
1
\lor
\dots
\lor
\varphi
_
n
)
,
\varphi
_
1
,
\dots
,
\varphi
_
n
\)
\\
,
\varphi
_
n
\)
\\
\ruleref
{
or
_
neg
}
&
\(
(
\varphi
_
1
\lor
\dots
\lor
\varphi
_
n
)
,
\neg
\varphi
_
k
\)
\\
\ruleref
{
xor
_
pos1
}
&
...
...
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