public class OrElimination extends Object implements Proof.NonLinearRule
Responsible for eliminating disjuncts by forking the proof into multiple branches, one for each clause in the disjunct. This is the canonical example of a non-linear proof rule. For example, consider an assertion such as the following:
assert:
forall(int x):
if:
(x > 0) || (x == 0)
then:
x >= 0
At some point during a proof-by-contradiction for this assertion, our proof will begin roughly as follows:
1. exists(int x).(((x == 0) || (x >= 1)) && (x < 0)) 2. ((x == 0) || (x >= 1)) && (x < 0) (Exists-E;1) 3. (x == 0) || (x >= 1) (And-E;2) 4. x < 0 (And-E;2)
At this point, we must apply or-elimination on (3) to complete the proof. Specifically, we split into two branches where one clause is assumed on each. This looks roughly as follows:
1. exists(int x).(((x == 0) || (x >= 1)) && (x < 0)) 2. ((x == 0) || (x >= 1)) && (x < 0) (Exists-E;1) 3. (x == 0) || (x >= 1) (And-E;2) 4. x < 0 (And-E;2) ================================================================== | 5. x == 0 (Or-I;3) | 6. false (Eq-S;4,5) ------------------------------------------------------------------ | 7. x >= 1 (Or-I;3) | 8. false (Ieq-I;4,7) ==================================================================
Here we see the proof is completed by showing a contradiction in both branches.
| Constructor and Description |
|---|
OrElimination() |
| Modifier and Type | Method and Description |
|---|---|
Proof.State[] |
apply(Proof.State state,
Formula truth) |
Proof.State[] |
apply(Proof.State current,
Proof.State head)
Apply a given rule to a given state, producing one (or more)
potentially updated states.
|
String |
getName()
Get the name of this rule
|
public String getName()
Proof.RulegetName in interface Proof.Rulepublic Proof.State[] apply(Proof.State current, Proof.State head) throws wybs.lang.NameResolver.ResolutionError
Proof.NonLinearRuleapply in interface Proof.NonLinearRulecurrent - The current state of truth. That is, everything which is
known to be true at this point.head - The current tip of the proof branch. This maybe some
distance in the future from the current state, and
identifies truths which have yet to be processed.wybs.lang.NameResolver.ResolutionErrorpublic Proof.State[] apply(Proof.State state, Formula truth)
Copyright © 2017. All rights reserved.