(* == Tri bubble *)

Fixpoint bubble_aux (x : list nat) : nat -> list nat :=
  fun n : nat =>
  match x with
  | Nil => Cons nat n (Nil nat)
  | Cons n0 l =>
      si (list nat) (inf_egal n n0) (Cons nat n (bubble_aux l n0))
        (Cons nat n0 (bubble_aux l n))
  end.Definition bubble (x : list nat) : list nat :=
  match x with
  | Nil => Nil nat
  | Cons n l => bubble_aux l n
  end.

Lemma bubble_eq2 : forall n : nat, bubble (Cons nat n (Nil nat)) = Cons nat n (Nil nat).