Section establishing_membership_inversion.
(* A restricted definition of membership, not up to equivalence *)
Reserved Notation "x ⋷ y" (at level 70, no associativity).
Inductive bt_restr_mem : bt -> bt -> Prop :=
| in_btrm_0 : forall s t,            s ⋷ s⪧t
| in_btrm_1 : forall s t u, s ⋷ u -> s ⋷ t⪧u
where "s ⋷ t" := (bt_restr_mem s t).
Hint Constructors bt_restr_mem : core.
Fact btrm_inv u s t : u ⋷ s⪧t <-> u = s \/ u ⋷ t.
Notation "s ≾ t" := (forall u, u ⋷ s -> exists v, v ⋷ t /\ u ≈ v).
Fact bt_rincl_refl s : s ≾ s.
Hint Resolve bt_rincl_refl bt_rincl_trans : core.
Fact btrm_btm s t : s ⋷ t -> s ∈ t.
Hint Resolve btrm_btm : core.
Fact btm_congr_l s t u : s ≈ t -> s ∈ u -> t ∈ u.
Fact btm_inv_0 s : s ∈ ∅ <-> False.
End establishing_membership_inversion.
Add Parametric Morphism: (bt_mem) with signature
(bt_equiv) ==> (bt_equiv) ==> (iff) as bte_congr.
Tactic Notation "btm" "simpl" :=
repeat match goal with
| |- context[_ ∈ _ ⪧ _] => rewrite btm_inv; auto; try tauto
| |- context[_ ∈ ∅]    => rewrite btm_inv_0; auto; try tauto
end.
(* Very important to build the finite HF-model  Up to ≈, membership in t is finite *)

Theorem btm_finite_t t : { l | forall s, s ∈ t <-> exists s', s ≈ s' /\ In s' l }.