fst (List.nth (constructors_of_inductive_type uri i) (j-1))
   with Not_found -> assert false)
 
+let hide_coercions = ref true;;
+
 let ast_of_acic0 term_info acic k =
   let k = k term_info in
   let id_to_uris = term_info.uri in
     | Cic.ALetIn (id,n,s,t) ->
         idref id (Ast.LetIn ((CicNotationUtil.name_of_cic_name n, None),
           k s, k t))
-    | Cic.AAppl (aid,args) -> idref aid (Ast.Appl (List.map k args))
+    | Cic.AAppl (aid,(Cic.AConst _ as he::tl as args))
+    | Cic.AAppl (aid,(Cic.AMutInd _ as he::tl as args))
+    | Cic.AAppl (aid,(Cic.AMutConstruct _ as he::tl as args)) ->
+       if CoercGraph.is_a_coercion (Deannotate.deannotate_term he) &&
+          !hide_coercions
+       then
+        let rec last =
+         function
+            [] -> assert false
+          | [t] -> t
+          | _::tl -> last tl
+        in
+         idref aid (k (last tl))
+       else
+        idref aid (Ast.Appl (List.map k args))
+    | Cic.AAppl (aid,args) ->
+        idref aid (Ast.Appl (List.map k args))
     | Cic.AConst (id,uri,substs) ->
         register_uri id uri;
         idref id (Ast.Ident (UriManager.name_of_uri uri, aux_substs substs))
 
  * http://helm.cs.unibo.it/
  *)
 
+val hide_coercions: bool ref
+
   (** {2 Persistant state handling} *)
 
 type interpretation_id
 
    is_finite_enumerable:> finite_enumerable semigroup
  }.
 
-notation < "S"
-for @{ 'semigroup_of_finite_enumerable_semigroup $S }.
-
-interpretation "Semigroup_of_finite_enumerable_semigroup"
- 'semigroup_of_finite_enumerable_semigroup S
-=
- (cic:/matita/algebra/finite_groups/semigroup.con S).
-
-notation < "S"
-for @{ 'magma_of_finite_enumerable_semigroup $S }.
-
-interpretation "Magma_of_finite_enumerable_semigroup"
- 'magma_of_finite_enumerable_semigroup S
-=
- (cic:/matita/algebra/finite_groups/Magma_of_finite_enumerable_SemiGroup.con S).
- 
-notation < "S"
-for @{ 'type_of_finite_enumerable_semigroup $S }.
-
-interpretation "Type_of_finite_enumerable_semigroup"
- 'type_of_finite_enumerable_semigroup S
-=
- (cic:/matita/algebra/finite_groups/Type_of_finite_enumerable_SemiGroup.con S).
-
 interpretation "Finite_enumerable representation" 'repr S i =
  (cic:/matita/algebra/finite_groups/repr.con S
   (cic:/matita/algebra/finite_groups/is_finite_enumerable.con S) i).
 
    group_properties:> isGroup pregroup
  }.
 
-(*notation < "G"
-for @{ 'monoid $G }.
-
-interpretation "Monoid coercion" 'monoid G =
- (cic:/matita/algebra/groups/monoid.con G).*)
-
-notation < "G"
-for @{ 'type_of_group $G }.
-
-interpretation "Type_of_group coercion" 'type_of_group G =
- (cic:/matita/algebra/groups/Type_of_Group.con G).
-
-notation < "G"
-for @{ 'magma_of_group $G }.
-
-interpretation "magma_of_group coercion" 'magma_of_group G =
- (cic:/matita/algebra/groups/Magma_of_Group.con G).
-
 notation "hvbox(x \sup (-1))" with precedence 89
 for @{ 'ginv $x }.
 
    embed:> monomorphism group G
  }.
 
-notation < "G"
-for @{ 'type_of_subgroup $G }.
-
-interpretation "Type_of_subgroup coercion" 'type_of_subgroup G =
- (cic:/matita/algebra/groups/Type_of_subgroup.con _ G).
- 
 notation "hvbox(x \sub H)" with precedence 79
 for @{ 'subgroupimage $H $x }.
 
 
    e: magma
  }.
 
-notation < "M" for @{ 'pmmagma $M }.
-interpretation "premonoid magma coercion" 'pmmagma M =
- (cic:/matita/algebra/monoids/magma.con M).
-
 record isMonoid (M:PreMonoid) : Prop ≝
  { is_semi_group:> isSemiGroup M;
    e_is_left_unit:
    monoid_properties:> isMonoid premonoid 
  }.
 
-notation < "M" for @{ 'semigroup $M }.
-interpretation "premonoid coercion" 'premonoid M =
- (cic:/matita/algebra/monoids/premonoid.con M).
- 
-notation < "M" for @{ 'typeofmonoid $M }.
-interpretation "premonoid coercion" 'typeofmonoid M =
- (cic:/matita/algebra/monoids/Type_of_Monoid.con M).
- 
-notation < "M" for @{ 'magmaofmonoid $M }.
-interpretation "premonoid coercion" 'magmaofmonoid M =
- (cic:/matita/algebra/monoids/Magma_of_Monoid.con M).
- 
 notation "1" with precedence 89
 for @{ 'munit }.
 
 
    op: carrier → carrier → carrier
  }.
 
-notation < "M" for @{ 'carrier $M }.
-interpretation "carrier coercion" 'carrier S =
- (cic:/matita/algebra/semigroups/carrier.con S).
-
 notation "hvbox(a break \middot b)" 
   left associative with precedence 55
 for @{ 'magma_op $a $b }.
    semigroup_properties:> isSemiGroup magma
  }.
  
-notation < "S" for @{ 'magma $S }.
-interpretation "magma coercion" 'magma S =
- (cic:/matita/algebra/semigroups/magma.con S).
- 
 definition is_left_unit ≝
  λS:SemiGroup. λe:S. ∀x:S. e·x = x.
  
 
       (fun _ ->
         CicNotation.set_active_notations
           (List.map fst (CicNotation.get_all_notations ())));
+    addDebugItem "enable coercions hiding"
+      (fun _ -> TermAcicContent.hide_coercions := true);
+    addDebugItem "disable coercions hiding"
+      (fun _ -> TermAcicContent.hide_coercions := false);
   end
   (** Debugging }}} *)