(** * Various generic lemmas that aren't present in the standard library *)
From BusyCoq Require Export LibTactics.
Set Default Goal Selector "!".
(* We are currently in a deprecation cycle where this gets changed from [auto with *] to [auto]. Opt in to silence the warning. *)
Ltac Tauto.intuition_solver ::= auto.
(* sig *)
Notation "[: x :]" := (exist _ x _).
(* sumbool *)
Notation Yes := (left _ _).
Notation No := (right _ _).
Notation Reduce x := (if x then Yes else No).
Notation "a && b" := (if a then b else No).
(* sumor *)
Notation "!!" := (inright _).
Notation "[|| x ||]" := (inleft [: x :]).
Notation "'bind' x <- a ; b" := (match a with | [|| x ||] => b | !! => No end)
(right associativity, at level 60, x pattern).
Notation "'bind' x <-- a ; b" := (match a with | [|| x ||] => b | !! => !! end)
(right associativity, at level 60, x pattern).

Lemma const_unfold : forall T (x : T),
const x = Cons x (const x).