The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V33. Data structures and computation

Mathlib.Data.LawfulXor.Basic

39 declarations. Mathlib docs · Source

class LawfulXor E1 #

(α : Type u_1) → [XorOp α] → [Zero α] → Prop

A typeclass indicating that the xor operation, ^^^, is lawful.

ctor LawfulXor.mk E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α],
  (∀ (a b c : α), a ^^^ b ^^^ c = a ^^^ (b ^^^ c)) →
    (∀ (a : α), a ^^^ a = 0) → (∀ (a : α), a ^^^ 0 = a) → (∀ (a b : α), a ^^^ b = b ^^^ a) → LawfulXor α

theorem LawfulXor.xor_assoc E1 #

∀ {α : Type u_1} {inst : XorOp α} {inst_1 : Zero α} [self : LawfulXor α] (a b c : α), a ^^^ b ^^^ c = a ^^^ (b ^^^ c)

theorem LawfulXor.xor_self E0 #

∀ {α : Type u_1} {inst : XorOp α} {inst_1 : Zero α} [self : LawfulXor α] (a : α), a ^^^ a = 0

theorem LawfulXor.xor_zero E0 #

∀ {α : Type u_1} {inst : XorOp α} {inst_1 : Zero α} [self : LawfulXor α] (a : α), a ^^^ 0 = a

theorem LawfulXor.xor_comm E1 #

∀ {α : Type u_1} {inst : XorOp α} {inst_1 : Zero α} [self : LawfulXor α] (a b : α), a ^^^ b = b ^^^ a

theorem zero_xor E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] (a : α), 0 ^^^ a = a

instance instCommutativeXor_mathlib E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α], Std.Commutative XorOp.xor

instance instAssociativeXor_mathlib E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α], Std.Associative XorOp.xor

instance instLawfulCommIdentityXorOfNat_mathlib E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [inst_2 : LawfulXor α], Std.LawfulCommIdentity XorOp.xor 0

theorem xor_cancel_left E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] (a b : α), a ^^^ (a ^^^ b) = b

theorem xor_cancel_right E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] (a b : α), a ^^^ b ^^^ b = a

instance instLawfulXorNat E0 #

LawfulXor ℕ

instance instLawfulXorFinHPowNatOfNat E0 #

∀ {w : ℕ}, LawfulXor (Fin (2 ^ w))

instance instLawfulXorBitVec E0 #

∀ {w : ℕ}, LawfulXor (BitVec w)

instance instLawfulXorUInt8 E0 #

LawfulXor UInt8

instance instLawfulXorUInt16 E0 #

LawfulXor UInt16

instance instLawfulXorUInt32 E0 #

LawfulXor UInt32

instance instLawfulXorUInt64 E0 #

LawfulXor UInt64

instance instLawfulXorUSize E0 #

LawfulXor USize

instance instLawfulXorInt8 E0 #

LawfulXor Int8

instance instLawfulXorInt16 E0 #

LawfulXor Int16

instance instLawfulXorInt32 E0 #

LawfulXor Int32

instance instLawfulXorInt64 E0 #

LawfulXor Int64

instance instLawfulXorISize E0 #

LawfulXor ISize

theorem xor_right_eq E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] {a : α}, (fun x ↦ x ^^^ a) = fun x ↦ a ^^^ x

theorem xor_left_involutive E1 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] (a : α), Function.Involutive fun x ↦ x ^^^ a

theorem xor_right_involutive E1 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] (a : α), Function.Involutive fun x ↦ a ^^^ x

theorem xor_eq_iff_left_eq E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] (a b c : α), a ^^^ b = c ↔ a = c ^^^ b

theorem xor_eq_iff_right_eq E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] (a b c : α), a ^^^ b = c ↔ b = a ^^^ c

theorem xor_eq_zero_iff E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] {a b : α}, a ^^^ b = 0 ↔ a = b

theorem xor_xor_cancel_comm E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] (a b : α), a ^^^ b ^^^ a = b

theorem xor_xor_cancel_comm_assoc E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] (a b : α), a ^^^ (b ^^^ a) = b

theorem xor_left_eq_self_iff E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] {a b : α}, a ^^^ b = a ↔ b = 0

theorem xor_right_eq_self_iff E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] {a b : α}, b ^^^ a = a ↔ b = 0

theorem xor_left_eq_id_iff E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] {a : α}, (fun x ↦ a ^^^ x) = id ↔ a = 0

theorem xor_right_eq_id_iff E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] {a : α}, (fun x ↦ x ^^^ a) = id ↔ a = 0

theorem isFixedPt_xor_left_iff E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] {a b : α},
  Function.IsFixedPt (fun x ↦ a ^^^ x) b ↔ a = 0

theorem isFixedPt_xor_right_iff E0 #

∀ {α : Type u_1} [inst : XorOp α] [inst_1 : Zero α] [LawfulXor α] {a b : α},
  Function.IsFixedPt (fun x ↦ x ^^^ a) b ↔ a = 0