AND
EXISTS
1. math: "‾" / "¬" / "~" Engl.: Java: applies to one operand formula, which I call , as follows: ¬ negand e.g.: ¬ (s1.equals(s2)) // Java: e.g.: ¬ done // Java: e.g.: ¬ (x < y) // Java: 2. math: "∧" / "/\" Engl.: Java: applies to two operand formulas, called , as follows: conjunct1 ∧ conjunct2 e.g.: (x < y) ∧ (y < z) // Java: e.g.: ¬done ∧ (i < n) // Java: e.g.: ¬(¬done ∧ i < n) ∧ (c == x) // Java: 3. math: "∨" / "\/" Engl.: Java: applies to two operand formulas, called , as follows: disjunct1 ∨ disjunct2 e.g.: x<y ∨ x≥y // Java: e.g.: (i<n ∧ a[i]==null) ∨ (¬done ∧ a[i]≠null) // Java: e.g.: ¬(i<n ∨ a[i]==null) ∧ (¬done ∨ a[i]≠null) // Java: 4. math: "→" / "⇒" / "-->" / "if-then" Engl.: Java: applies to two operand formulas called and as follows: antecedent → consequent e.g.: x<y → x≤y // Java: e.g.: (i==n ∨ done) → ((i==n ∧ done) ∨ (¬done ∧ i<n)) // Java: e.g.: ((i==n → done) ∧ (done → i==n)) ∨ ¬done // Java: 5. math: "↔" / "⇔" / "<-->" / "iff" Engl.: Java: applies to two operand formulas as follows: formula1 ↔ formula2 e.g.: (x<y) ↔ (y>x) // Java: e.g.: ¬(x<y ∧ y<z) ↔ (¬(x<y) ∨ ¬(y<z)) // Java: e.g.: (¬(x<y) ↔ (x≥z)) → (¬((x<z) ↔ (y=z)) ∧ x>y) // Java: 6. math: "⊕" / "(+)" Engl.: Java: C++: · · ·
∧ ¬ ¬ ∨ (x < y) ¬ (y < z)
) x≠y ∧ y<z ¬
(¬(x<y) ↔ (x≥z)) → (¬((x<z) ↔ (y=z)) ∧ x>y)
¬done ∨ x<y ∧ y≥z
(¬done) ∨ (i<n ∧ x==result)
- x + y * z
*
+
¬ ∧ ∨ → ↔
! && ||
¬done ∨ i<n ∧ x==result
¬((done ∨ i<n) ∧ x==result)
(¬done ∨ i<n) ∧ x==result
¬done ∨ (i<n ∧ x==result)
&&
||
ν | ¬ν --+--- t | f i.e. ¬t := f f | t i.e. ¬f := t
κ1 | κ2 || κ1 ∧ κ2 ---+----++--------- t | t || t i.e. t ∧ t := t t | f || f i.e. t ∧ f := f f | t || f i.e. f ∧ t := f f | f || f i.e. f ∧ f := f
κ1
κ2
κ1 ∧ κ2
if ( x<y && y<z ) ...
κ1∧κ2 :=
κ1 := t
κ2 := t
δ1 | δ2 || δ1 ∨ δ2 ---+----++--------- t | t || t t | f || t f | t || t f | f || f
δ1∨δ2 :=
δ1 := f
δ2 := f
α | κ || α → κ --+---++------- t | t || t t | f || f f | t || t f | f || t
if ( x < y ) z = 5; System.out.println(z);
"When the value of x is less than y α then → the output will be 5." κ
α
κ
α→κ
x
y
5
→
α→κ :=
α := t
κ := f
φ1 | φ2 || φ1 ↔ φ2 ---+----++---------- t | t || t t | f || f f | t || f f | f || t
φ1 ↔ φ2
φ1
φ2
(φ1 → φ2) ∧ (φ2 → φ1)
(φ1 ∧ φ2) ∨ (¬φ2 ∧ ¬φ1)
i<n ∧ y≥z → ¬done ∧
(i<n):=, (y≥z):=, done:=,
i<n
y≥z
done
computer_won
boolean
boolean P, Q, R, P2, Q2, ...;
(¬P) ∨ (Q ∧ R)
P:=, Q:=, R:=
(¬P ) ∨ (Q ∧ R ) := (¬) ∨ ( ∧ ) := () ∨ () :=
P:=, R:=, Q:=, S:=
(S → (P ∧ ¬R )) ∧ ((P → (R ∨ Q )) ∧ S ) := ( → ( ∧ ¬)) ∧ (( → ( ∨ )) ∧ ) := ( → ( ∧ )) ∧ (( → ()) ∧ ) := ( → ()) ∧ (() ∧ ) := () ∧ () :=
(¬P) ∨ (Q ∧ R) (¬f) ∨ (t ∧ f) (S → (P ∧ (¬R))) ∧ ((P → (R ∨ Q)) ∧ S) (t → (f ∧ (¬f))) ∧ ((f → (f ∨ t)) ∧ t)
(P → ¬Q) → Q
P:=, Q:=
(P ∧ Q) ∧ ¬P
¬P ∨ P
P || ¬P | ¬P ∨ P --++----+-------- t || f | t f || t | t
P | Q || P ∧ Q | (P ∧ Q) → P --+---++-------+--------------- t | t || t | t t | f || f | t f | t || f | t f | f || f | t
(P,Q,R,...)
¬P ∨ Q
P → Q
(¬P ∨ Q) ≡ (P → Q)
α → κ
κ → α
¬α → ¬κ
¬κ → ¬α
P | Q || P → Q | Q → P --+---++--------+------ t | t || t | t t | f || f | t f | t || t | f f | f || t | t P | Q || P → Q | ¬P | ¬Q | ¬P → ¬Q --+---++--------+----+----+-------- t | t || t | f | f | t t | f || f | f | t | t f | t || t | t | f | f f | f || t | t | t | t