@[reducible, inline]
Boolean “exclusive or”. xor x y
can be written x ^^ y
.
x ^^ y
is true
when precisely one of x
or y
is true
. Unlike and
and or
, it does not
have short-circuiting behavior, because one argument's value never determines the final value. Also
unlike and
and or
, there is no commonly-used corresponding propositional connective.
Examples:
false ^^ false = false
true ^^ false = true
false ^^ true = true
true ^^ true = false
Conventions for notations in identifiers:
- The recommended spelling of
^^
in identifiers isxor
.
Instances For
Boolean “exclusive or”. xor x y
can be written x ^^ y
.
x ^^ y
is true
when precisely one of x
or y
is true
. Unlike and
and or
, it does not
have short-circuiting behavior, because one argument's value never determines the final value. Also
unlike and
and or
, there is no commonly-used corresponding propositional connective.
Examples:
false ^^ false = false
true ^^ false = true
false ^^ true = true
true ^^ true = false
Conventions for notations in identifiers:
- The recommended spelling of
^^
in identifiers isxor
.
Equations
- Bool.«term_^^_» = Lean.ParserDescr.trailingNode `Bool.«term_^^_» 33 33 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ^^ ") (Lean.ParserDescr.cat `term 34))
Instances For
Equations
- x.instDecidableLe y = inferInstanceAs (Decidable (x = true → y = true))
Equations
- x.instDecidableLt y = inferInstanceAs (Decidable ((!x && y) = true))
and #
@[reducible, inline, deprecated Bool.and_eq_left_iff_imp (since := "2025-04-04")]
Equations
Instances For
@[reducible, inline, deprecated Bool.and_eq_right_iff_imp (since := "2025-04-04")]
Equations
Instances For
@[reducible, inline, deprecated Bool.eq_self_and (since := "2025-04-04")]
Equations
Instances For
@[reducible, inline, deprecated Bool.eq_and_self (since := "2025-04-04")]
Equations
Instances For
or #
@[reducible, inline, deprecated Bool.or_eq_left_iff_imp (since := "2025-04-04")]
Equations
Instances For
@[reducible, inline, deprecated Bool.or_eq_right_iff_imp (since := "2025-04-04")]
Equations
Instances For
@[reducible, inline, deprecated Bool.eq_self_or (since := "2025-04-04")]
Equations
Instances For
@[reducible, inline, deprecated Bool.eq_or_self (since := "2025-04-04")]
Equations
Instances For
@[reducible, inline, deprecated Bool.not_or_eq_left_iff_and (since := "2025-04-04")]
Instances For
@[reducible, inline, deprecated Bool.or_not_eq_right_iff_and (since := "2025-04-04")]
Instances For
@[reducible, inline, deprecated Bool.eq_not_self_or (since := "2025-04-04")]
Equations
Instances For
@[reducible, inline, deprecated Bool.eq_or_not_self (since := "2025-04-04")]
Equations
Instances For
distributivity #
eq/beq/bne #
coercision related normal forms #
beq properties #
xor #
le/lt #
min/max #
injectivity lemmas #
toNat #
toInt #
ite #
forall #
exists #
cond #
@[reducible, inline, deprecated Bool.cond_then_not_self (since := "2025-04-04")]
Instances For
@[reducible, inline, deprecated Bool.cond_else_not_self (since := "2025-04-04")]
Instances For
@[reducible, inline, deprecated Bool.cond_then_self (since := "2025-04-04")]
Equations
Instances For
@[reducible, inline, deprecated Bool.cond_else_self (since := "2025-04-04")]