(* Generated by coq-of-rust *)
Require Import CoqOfRust.CoqOfRust.

Module char.
  Definition value_TAG_CONT : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U8 128 |))).
  
  Definition value_TAG_TWO_B : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U8 192 |))).
  
  Definition value_TAG_THREE_B : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U8 224 |))).
  
  Definition value_TAG_FOUR_B : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U8 240 |))).
  
  Definition value_MAX_ONE_B : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U32 128 |))).
  
  Definition value_MAX_TWO_B : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U32 2048 |))).
  
  Definition value_MAX_THREE_B : Value.t :=
    M.run ltac:(M.monadic (M.alloc (| Value.Integer IntegerKind.U32 65536 |))).
  
  Definition value_MAX : Value.t :=
    M.run ltac:(M.monadic (M.get_constant (| "core::char::methods::MAX" |))).
  
  Definition value_REPLACEMENT_CHARACTER : Value.t :=
    M.run ltac:(M.monadic (M.get_constant (| "core::char::methods::REPLACEMENT_CHARACTER" |))).
  
  Definition value_UNICODE_VERSION : Value.t :=
    M.run ltac:(M.monadic (M.get_constant (| "core::char::methods::UNICODE_VERSION" |))).
  
  (*
  pub fn decode_utf16<I: IntoIterator<Item = u16>>(iter: I) -> DecodeUtf16<I::IntoIter> {
      self::decode::decode_utf16(iter)
  }
  *)
  Definition decode_utf16 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [ _ as I ], [ iter ] =>
      ltac:(M.monadic
        (let iter := M.alloc (| iter |) in
        M.call_closure (|
          M.get_function (| "core::char::decode::decode_utf16", [ I ] |),
          [ M.read (| iter |) ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_decode_utf16 : M.IsFunction "core::char::decode_utf16" decode_utf16.
  
  (*
  pub const fn from_u32(i: u32) -> Option<char> {
      self::convert::from_u32(i)
  }
  *)
  Definition from_u32 (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ i ] =>
      ltac:(M.monadic
        (let i := M.alloc (| i |) in
        M.call_closure (|
          M.get_function (| "core::char::convert::from_u32", [] |),
          [ M.read (| i |) ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_from_u32 : M.IsFunction "core::char::from_u32" from_u32.
  
  (*
  pub const unsafe fn from_u32_unchecked(i: u32) -> char {
      // SAFETY: the safety contract must be upheld by the caller.
      unsafe { self::convert::from_u32_unchecked(i) }
  }
  *)
  Definition from_u32_unchecked (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ i ] =>
      ltac:(M.monadic
        (let i := M.alloc (| i |) in
        M.call_closure (|
          M.get_function (| "core::char::convert::from_u32_unchecked", [] |),
          [ M.read (| i |) ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_from_u32_unchecked :
    M.IsFunction "core::char::from_u32_unchecked" from_u32_unchecked.
  
  (*
  pub const fn from_digit(num: u32, radix: u32) -> Option<char> {
      self::convert::from_digit(num, radix)
  }
  *)
  Definition from_digit (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
    match ε, τ, α with
    | [], [], [ num; radix ] =>
      ltac:(M.monadic
        (let num := M.alloc (| num |) in
        let radix := M.alloc (| radix |) in
        M.call_closure (|
          M.get_function (| "core::char::convert::from_digit", [] |),
          [ M.read (| num |); M.read (| radix |) ]
        |)))
    | _, _, _ => M.impossible "wrong number of arguments"
    end.
  
  Axiom Function_from_digit : M.IsFunction "core::char::from_digit" from_digit.
  
  (* StructTuple
    {
      name := "EscapeUnicode";
      const_params := [];
      ty_params := [];
      fields :=
        [
          Ty.apply
            (Ty.path "core::escape::EscapeIterInner")
            [ Value.Integer IntegerKind.Usize 10 ]
            []
        ];
    } *)
  
  Module Impl_core_clone_Clone_for_core_char_EscapeUnicode.
    Definition Self : Ty.t := Ty.path "core::char::EscapeUnicode".
    
    (* Clone *)
    Definition clone (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          Value.StructTuple
            "core::char::EscapeUnicode"
            [
              M.call_closure (|
                M.get_trait_method (|
                  "core::clone::Clone",
                  Ty.apply
                    (Ty.path "core::escape::EscapeIterInner")
                    [ Value.Integer IntegerKind.Usize 10 ]
                    [],
                  [],
                  "clone",
                  []
                |),
                [
                  M.SubPointer.get_struct_tuple_field (|
                    M.read (| self |),
                    "core::char::EscapeUnicode",
                    0
                  |)
                ]
              |)
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_core_char_EscapeUnicode.
  
  Module Impl_core_fmt_Debug_for_core_char_EscapeUnicode.
    Definition Self : Ty.t := Ty.path "core::char::EscapeUnicode".
    
    (* Debug *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::Formatter",
              "debug_tuple_field1_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "EscapeUnicode" |);
              M.alloc (|
                M.SubPointer.get_struct_tuple_field (|
                  M.read (| self |),
                  "core::char::EscapeUnicode",
                  0
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_core_char_EscapeUnicode.
  
  Module Impl_core_char_EscapeUnicode.
    Definition Self : Ty.t := Ty.path "core::char::EscapeUnicode".
    
    (*
        const fn new(c: char) -> Self {
            Self(escape::EscapeIterInner::unicode(c))
        }
    *)
    Definition new (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ c ] =>
        ltac:(M.monadic
          (let c := M.alloc (| c |) in
          Value.StructTuple
            "core::char::EscapeUnicode"
            [
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply
                    (Ty.path "core::escape::EscapeIterInner")
                    [ Value.Integer IntegerKind.Usize 10 ]
                    [],
                  "unicode",
                  []
                |),
                [ M.read (| c |) ]
              |)
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new.
  End Impl_core_char_EscapeUnicode.
  
  Module Impl_core_iter_traits_iterator_Iterator_for_core_char_EscapeUnicode.
    Definition Self : Ty.t := Ty.path "core::char::EscapeUnicode".
    
    (*     type Item = char; *)
    Definition _Item : Ty.t := Ty.path "char".
    
    (*
        fn next(&mut self) -> Option<char> {
            self.0.next().map(char::from)
        }
    *)
    Definition next (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.apply (Ty.path "core::option::Option") [] [ Ty.path "u8" ],
              "map",
              [ Ty.path "char"; Ty.function [ Ty.path "u8" ] (Ty.path "char") ]
            |),
            [
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply
                    (Ty.path "core::escape::EscapeIterInner")
                    [ Value.Integer IntegerKind.Usize 10 ]
                    [],
                  "next",
                  []
                |),
                [
                  M.SubPointer.get_struct_tuple_field (|
                    M.read (| self |),
                    "core::char::EscapeUnicode",
                    0
                  |)
                ]
              |);
              M.get_trait_method (|
                "core::convert::From",
                Ty.path "char",
                [ Ty.path "u8" ],
                "from",
                []
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn size_hint(&self) -> (usize, Option<usize>) {
            let n = self.0.len();
            (n, Some(n))
        }
    *)
    Definition size_hint (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (|
            let~ n :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply
                      (Ty.path "core::escape::EscapeIterInner")
                      [ Value.Integer IntegerKind.Usize 10 ]
                      [],
                    "len",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_tuple_field (|
                      M.read (| self |),
                      "core::char::EscapeUnicode",
                      0
                    |)
                  ]
                |)
              |) in
            M.alloc (|
              Value.Tuple
                [ M.read (| n |); Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ]
                ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn count(self) -> usize {
            self.0.len()
        }
    *)
    Definition count (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.apply
                (Ty.path "core::escape::EscapeIterInner")
                [ Value.Integer IntegerKind.Usize 10 ]
                [],
              "len",
              []
            |),
            [ M.SubPointer.get_struct_tuple_field (| self, "core::char::EscapeUnicode", 0 |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn last(mut self) -> Option<char> {
            self.0.next_back().map(char::from)
        }
    *)
    Definition last (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.apply (Ty.path "core::option::Option") [] [ Ty.path "u8" ],
              "map",
              [ Ty.path "char"; Ty.function [ Ty.path "u8" ] (Ty.path "char") ]
            |),
            [
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply
                    (Ty.path "core::escape::EscapeIterInner")
                    [ Value.Integer IntegerKind.Usize 10 ]
                    [],
                  "next_back",
                  []
                |),
                [ M.SubPointer.get_struct_tuple_field (| self, "core::char::EscapeUnicode", 0 |) ]
              |);
              M.get_trait_method (|
                "core::convert::From",
                Ty.path "char",
                [ Ty.path "u8" ],
                "from",
                []
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>> {
            self.0.advance_by(n)
        }
    *)
    Definition advance_by (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; n ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let n := M.alloc (| n |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.apply
                (Ty.path "core::escape::EscapeIterInner")
                [ Value.Integer IntegerKind.Usize 10 ]
                [],
              "advance_by",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::EscapeUnicode",
                0
              |);
              M.read (| n |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::iterator::Iterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [
          ("Item", InstanceField.Ty _Item);
          ("next", InstanceField.Method next);
          ("size_hint", InstanceField.Method size_hint);
          ("count", InstanceField.Method count);
          ("last", InstanceField.Method last);
          ("advance_by", InstanceField.Method advance_by)
        ].
  End Impl_core_iter_traits_iterator_Iterator_for_core_char_EscapeUnicode.
  
  Module Impl_core_iter_traits_exact_size_ExactSizeIterator_for_core_char_EscapeUnicode.
    Definition Self : Ty.t := Ty.path "core::char::EscapeUnicode".
    
    (*
        fn len(&self) -> usize {
            self.0.len()
        }
    *)
    Definition len (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.apply
                (Ty.path "core::escape::EscapeIterInner")
                [ Value.Integer IntegerKind.Usize 10 ]
                [],
              "len",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::EscapeUnicode",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::exact_size::ExactSizeIterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("len", InstanceField.Method len) ].
  End Impl_core_iter_traits_exact_size_ExactSizeIterator_for_core_char_EscapeUnicode.
  
  Module Impl_core_iter_traits_marker_FusedIterator_for_core_char_EscapeUnicode.
    Definition Self : Ty.t := Ty.path "core::char::EscapeUnicode".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::marker::FusedIterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_iter_traits_marker_FusedIterator_for_core_char_EscapeUnicode.
  
  Module Impl_core_fmt_Display_for_core_char_EscapeUnicode.
    Definition Self : Ty.t := Ty.path "core::char::EscapeUnicode".
    
    (*
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            f.write_str(self.0.as_str())
        }
    *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |),
            [
              M.read (| f |);
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply
                    (Ty.path "core::escape::EscapeIterInner")
                    [ Value.Integer IntegerKind.Usize 10 ]
                    [],
                  "as_str",
                  []
                |),
                [
                  M.SubPointer.get_struct_tuple_field (|
                    M.read (| self |),
                    "core::char::EscapeUnicode",
                    0
                  |)
                ]
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Display"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Display_for_core_char_EscapeUnicode.
  
  (* StructTuple
    {
      name := "EscapeDefault";
      const_params := [];
      ty_params := [];
      fields :=
        [
          Ty.apply
            (Ty.path "core::escape::EscapeIterInner")
            [ Value.Integer IntegerKind.Usize 10 ]
            []
        ];
    } *)
  
  Module Impl_core_clone_Clone_for_core_char_EscapeDefault.
    Definition Self : Ty.t := Ty.path "core::char::EscapeDefault".
    
    (* Clone *)
    Definition clone (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          Value.StructTuple
            "core::char::EscapeDefault"
            [
              M.call_closure (|
                M.get_trait_method (|
                  "core::clone::Clone",
                  Ty.apply
                    (Ty.path "core::escape::EscapeIterInner")
                    [ Value.Integer IntegerKind.Usize 10 ]
                    [],
                  [],
                  "clone",
                  []
                |),
                [
                  M.SubPointer.get_struct_tuple_field (|
                    M.read (| self |),
                    "core::char::EscapeDefault",
                    0
                  |)
                ]
              |)
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_core_char_EscapeDefault.
  
  Module Impl_core_fmt_Debug_for_core_char_EscapeDefault.
    Definition Self : Ty.t := Ty.path "core::char::EscapeDefault".
    
    (* Debug *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::Formatter",
              "debug_tuple_field1_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "EscapeDefault" |);
              M.alloc (|
                M.SubPointer.get_struct_tuple_field (|
                  M.read (| self |),
                  "core::char::EscapeDefault",
                  0
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_core_char_EscapeDefault.
  
  Module Impl_core_char_EscapeDefault.
    Definition Self : Ty.t := Ty.path "core::char::EscapeDefault".
    
    (*
        const fn printable(c: ascii::Char) -> Self {
            Self(escape::EscapeIterInner::ascii(c.to_u8()))
        }
    *)
    Definition printable (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ c ] =>
        ltac:(M.monadic
          (let c := M.alloc (| c |) in
          Value.StructTuple
            "core::char::EscapeDefault"
            [
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply
                    (Ty.path "core::escape::EscapeIterInner")
                    [ Value.Integer IntegerKind.Usize 10 ]
                    [],
                  "ascii",
                  []
                |),
                [
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "core::ascii::ascii_char::AsciiChar",
                      "to_u8",
                      []
                    |),
                    [ M.read (| c |) ]
                  |)
                ]
              |)
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_printable : M.IsAssociatedFunction Self "printable" printable.
    
    (*
        const fn backslash(c: ascii::Char) -> Self {
            Self(escape::EscapeIterInner::backslash(c))
        }
    *)
    Definition backslash (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ c ] =>
        ltac:(M.monadic
          (let c := M.alloc (| c |) in
          Value.StructTuple
            "core::char::EscapeDefault"
            [
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply
                    (Ty.path "core::escape::EscapeIterInner")
                    [ Value.Integer IntegerKind.Usize 10 ]
                    [],
                  "backslash",
                  []
                |),
                [ M.read (| c |) ]
              |)
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_backslash : M.IsAssociatedFunction Self "backslash" backslash.
    
    (*
        const fn unicode(c: char) -> Self {
            Self(escape::EscapeIterInner::unicode(c))
        }
    *)
    Definition unicode (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ c ] =>
        ltac:(M.monadic
          (let c := M.alloc (| c |) in
          Value.StructTuple
            "core::char::EscapeDefault"
            [
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply
                    (Ty.path "core::escape::EscapeIterInner")
                    [ Value.Integer IntegerKind.Usize 10 ]
                    [],
                  "unicode",
                  []
                |),
                [ M.read (| c |) ]
              |)
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_unicode : M.IsAssociatedFunction Self "unicode" unicode.
  End Impl_core_char_EscapeDefault.
  
  Module Impl_core_iter_traits_iterator_Iterator_for_core_char_EscapeDefault.
    Definition Self : Ty.t := Ty.path "core::char::EscapeDefault".
    
    (*     type Item = char; *)
    Definition _Item : Ty.t := Ty.path "char".
    
    (*
        fn next(&mut self) -> Option<char> {
            self.0.next().map(char::from)
        }
    *)
    Definition next (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.apply (Ty.path "core::option::Option") [] [ Ty.path "u8" ],
              "map",
              [ Ty.path "char"; Ty.function [ Ty.path "u8" ] (Ty.path "char") ]
            |),
            [
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply
                    (Ty.path "core::escape::EscapeIterInner")
                    [ Value.Integer IntegerKind.Usize 10 ]
                    [],
                  "next",
                  []
                |),
                [
                  M.SubPointer.get_struct_tuple_field (|
                    M.read (| self |),
                    "core::char::EscapeDefault",
                    0
                  |)
                ]
              |);
              M.get_trait_method (|
                "core::convert::From",
                Ty.path "char",
                [ Ty.path "u8" ],
                "from",
                []
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn size_hint(&self) -> (usize, Option<usize>) {
            let n = self.0.len();
            (n, Some(n))
        }
    *)
    Definition size_hint (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (|
            let~ n :=
              M.alloc (|
                M.call_closure (|
                  M.get_associated_function (|
                    Ty.apply
                      (Ty.path "core::escape::EscapeIterInner")
                      [ Value.Integer IntegerKind.Usize 10 ]
                      [],
                    "len",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_tuple_field (|
                      M.read (| self |),
                      "core::char::EscapeDefault",
                      0
                    |)
                  ]
                |)
              |) in
            M.alloc (|
              Value.Tuple
                [ M.read (| n |); Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ]
                ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn count(self) -> usize {
            self.0.len()
        }
    *)
    Definition count (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.apply
                (Ty.path "core::escape::EscapeIterInner")
                [ Value.Integer IntegerKind.Usize 10 ]
                [],
              "len",
              []
            |),
            [ M.SubPointer.get_struct_tuple_field (| self, "core::char::EscapeDefault", 0 |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn last(mut self) -> Option<char> {
            self.0.next_back().map(char::from)
        }
    *)
    Definition last (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.apply (Ty.path "core::option::Option") [] [ Ty.path "u8" ],
              "map",
              [ Ty.path "char"; Ty.function [ Ty.path "u8" ] (Ty.path "char") ]
            |),
            [
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply
                    (Ty.path "core::escape::EscapeIterInner")
                    [ Value.Integer IntegerKind.Usize 10 ]
                    [],
                  "next_back",
                  []
                |),
                [ M.SubPointer.get_struct_tuple_field (| self, "core::char::EscapeDefault", 0 |) ]
              |);
              M.get_trait_method (|
                "core::convert::From",
                Ty.path "char",
                [ Ty.path "u8" ],
                "from",
                []
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>> {
            self.0.advance_by(n)
        }
    *)
    Definition advance_by (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; n ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let n := M.alloc (| n |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.apply
                (Ty.path "core::escape::EscapeIterInner")
                [ Value.Integer IntegerKind.Usize 10 ]
                [],
              "advance_by",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::EscapeDefault",
                0
              |);
              M.read (| n |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::iterator::Iterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [
          ("Item", InstanceField.Ty _Item);
          ("next", InstanceField.Method next);
          ("size_hint", InstanceField.Method size_hint);
          ("count", InstanceField.Method count);
          ("last", InstanceField.Method last);
          ("advance_by", InstanceField.Method advance_by)
        ].
  End Impl_core_iter_traits_iterator_Iterator_for_core_char_EscapeDefault.
  
  Module Impl_core_iter_traits_exact_size_ExactSizeIterator_for_core_char_EscapeDefault.
    Definition Self : Ty.t := Ty.path "core::char::EscapeDefault".
    
    (*
        fn len(&self) -> usize {
            self.0.len()
        }
    *)
    Definition len (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.apply
                (Ty.path "core::escape::EscapeIterInner")
                [ Value.Integer IntegerKind.Usize 10 ]
                [],
              "len",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::EscapeDefault",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::exact_size::ExactSizeIterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("len", InstanceField.Method len) ].
  End Impl_core_iter_traits_exact_size_ExactSizeIterator_for_core_char_EscapeDefault.
  
  Module Impl_core_iter_traits_marker_FusedIterator_for_core_char_EscapeDefault.
    Definition Self : Ty.t := Ty.path "core::char::EscapeDefault".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::marker::FusedIterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_iter_traits_marker_FusedIterator_for_core_char_EscapeDefault.
  
  Module Impl_core_fmt_Display_for_core_char_EscapeDefault.
    Definition Self : Ty.t := Ty.path "core::char::EscapeDefault".
    
    (*
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            f.write_str(self.0.as_str())
        }
    *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |),
            [
              M.read (| f |);
              M.call_closure (|
                M.get_associated_function (|
                  Ty.apply
                    (Ty.path "core::escape::EscapeIterInner")
                    [ Value.Integer IntegerKind.Usize 10 ]
                    [],
                  "as_str",
                  []
                |),
                [
                  M.SubPointer.get_struct_tuple_field (|
                    M.read (| self |),
                    "core::char::EscapeDefault",
                    0
                  |)
                ]
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Display"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Display_for_core_char_EscapeDefault.
  
  (* StructTuple
    {
      name := "EscapeDebug";
      const_params := [];
      ty_params := [];
      fields := [ Ty.path "core::char::EscapeDebugInner" ];
    } *)
  
  Module Impl_core_clone_Clone_for_core_char_EscapeDebug.
    Definition Self : Ty.t := Ty.path "core::char::EscapeDebug".
    
    (* Clone *)
    Definition clone (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          Value.StructTuple
            "core::char::EscapeDebug"
            [
              M.call_closure (|
                M.get_trait_method (|
                  "core::clone::Clone",
                  Ty.path "core::char::EscapeDebugInner",
                  [],
                  "clone",
                  []
                |),
                [
                  M.SubPointer.get_struct_tuple_field (|
                    M.read (| self |),
                    "core::char::EscapeDebug",
                    0
                  |)
                ]
              |)
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_core_char_EscapeDebug.
  
  Module Impl_core_fmt_Debug_for_core_char_EscapeDebug.
    Definition Self : Ty.t := Ty.path "core::char::EscapeDebug".
    
    (* Debug *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::Formatter",
              "debug_tuple_field1_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "EscapeDebug" |);
              M.alloc (|
                M.SubPointer.get_struct_tuple_field (|
                  M.read (| self |),
                  "core::char::EscapeDebug",
                  0
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_core_char_EscapeDebug.
  
  (*
  Enum EscapeDebugInner
  {
    const_params := [];
    ty_params := [];
    variants :=
      [
        {
          name := "Bytes";
          item :=
            StructTuple
              [
                Ty.apply
                  (Ty.path "core::escape::EscapeIterInner")
                  [ Value.Integer IntegerKind.Usize 10 ]
                  []
              ];
          discriminant := None;
        };
        {
          name := "Char";
          item := StructTuple [ Ty.path "char" ];
          discriminant := None;
        }
      ];
  }
  *)
  
  Module Impl_core_clone_Clone_for_core_char_EscapeDebugInner.
    Definition Self : Ty.t := Ty.path "core::char::EscapeDebugInner".
    
    (* Clone *)
    Definition clone (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (|
            M.match_operator (|
              self,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "core::char::EscapeDebugInner::Bytes",
                        0
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::char::EscapeDebugInner::Bytes"
                        [
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::clone::Clone",
                              Ty.apply
                                (Ty.path "core::escape::EscapeIterInner")
                                [ Value.Integer IntegerKind.Usize 10 ]
                                [],
                              [],
                              "clone",
                              []
                            |),
                            [ M.read (| __self_0 |) ]
                          |)
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "core::char::EscapeDebugInner::Char",
                        0
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::char::EscapeDebugInner::Char"
                        [
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::clone::Clone",
                              Ty.path "char",
                              [],
                              "clone",
                              []
                            |),
                            [ M.read (| __self_0 |) ]
                          |)
                        ]
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_core_char_EscapeDebugInner.
  
  Module Impl_core_fmt_Debug_for_core_char_EscapeDebugInner.
    Definition Self : Ty.t := Ty.path "core::char::EscapeDebugInner".
    
    (* Debug *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.read (|
            M.match_operator (|
              self,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "core::char::EscapeDebugInner::Bytes",
                        0
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_tuple_field1_finish",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "Bytes" |); __self_0 ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "core::char::EscapeDebugInner::Char",
                        0
                      |) in
                    let __self_0 := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "debug_tuple_field1_finish",
                          []
                        |),
                        [ M.read (| f |); M.read (| Value.String "Char" |); __self_0 ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_core_char_EscapeDebugInner.
  
  Module Impl_core_char_EscapeDebug.
    Definition Self : Ty.t := Ty.path "core::char::EscapeDebug".
    
    (*
        const fn printable(chr: char) -> Self {
            Self(EscapeDebugInner::Char(chr))
        }
    *)
    Definition printable (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ chr ] =>
        ltac:(M.monadic
          (let chr := M.alloc (| chr |) in
          Value.StructTuple
            "core::char::EscapeDebug"
            [ Value.StructTuple "core::char::EscapeDebugInner::Char" [ M.read (| chr |) ] ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_printable : M.IsAssociatedFunction Self "printable" printable.
    
    (*
        const fn backslash(c: ascii::Char) -> Self {
            Self(EscapeDebugInner::Bytes(escape::EscapeIterInner::backslash(c)))
        }
    *)
    Definition backslash (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ c ] =>
        ltac:(M.monadic
          (let c := M.alloc (| c |) in
          Value.StructTuple
            "core::char::EscapeDebug"
            [
              Value.StructTuple
                "core::char::EscapeDebugInner::Bytes"
                [
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply
                        (Ty.path "core::escape::EscapeIterInner")
                        [ Value.Integer IntegerKind.Usize 10 ]
                        [],
                      "backslash",
                      []
                    |),
                    [ M.read (| c |) ]
                  |)
                ]
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_backslash : M.IsAssociatedFunction Self "backslash" backslash.
    
    (*
        const fn unicode(c: char) -> Self {
            Self(EscapeDebugInner::Bytes(escape::EscapeIterInner::unicode(c)))
        }
    *)
    Definition unicode (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ c ] =>
        ltac:(M.monadic
          (let c := M.alloc (| c |) in
          Value.StructTuple
            "core::char::EscapeDebug"
            [
              Value.StructTuple
                "core::char::EscapeDebugInner::Bytes"
                [
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply
                        (Ty.path "core::escape::EscapeIterInner")
                        [ Value.Integer IntegerKind.Usize 10 ]
                        [],
                      "unicode",
                      []
                    |),
                    [ M.read (| c |) ]
                  |)
                ]
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_unicode : M.IsAssociatedFunction Self "unicode" unicode.
    
    (*
        fn clear(&mut self) {
            self.0 = EscapeDebugInner::Bytes(escape::EscapeIterInner::empty());
        }
    *)
    Definition clear (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (|
            let~ _ :=
              M.write (|
                M.SubPointer.get_struct_tuple_field (|
                  M.read (| self |),
                  "core::char::EscapeDebug",
                  0
                |),
                Value.StructTuple
                  "core::char::EscapeDebugInner::Bytes"
                  [
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.apply
                          (Ty.path "core::escape::EscapeIterInner")
                          [ Value.Integer IntegerKind.Usize 10 ]
                          [],
                        "empty",
                        []
                      |),
                      []
                    |)
                  ]
              |) in
            M.alloc (| Value.Tuple [] |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_clear : M.IsAssociatedFunction Self "clear" clear.
  End Impl_core_char_EscapeDebug.
  
  Module Impl_core_iter_traits_iterator_Iterator_for_core_char_EscapeDebug.
    Definition Self : Ty.t := Ty.path "core::char::EscapeDebug".
    
    (*     type Item = char; *)
    Definition _Item : Ty.t := Ty.path "char".
    
    (*
        fn next(&mut self) -> Option<char> {
            match self.0 {
                EscapeDebugInner::Bytes(ref mut bytes) => bytes.next().map(char::from),
                EscapeDebugInner::Char(chr) => {
                    self.clear();
                    Some(chr)
                }
            }
        }
    *)
    Definition next (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (|
            M.match_operator (|
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::EscapeDebug",
                0
              |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "core::char::EscapeDebugInner::Bytes",
                        0
                      |) in
                    let bytes := M.alloc (| γ0_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply (Ty.path "core::option::Option") [] [ Ty.path "u8" ],
                          "map",
                          [ Ty.path "char"; Ty.function [ Ty.path "u8" ] (Ty.path "char") ]
                        |),
                        [
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.apply
                                (Ty.path "core::escape::EscapeIterInner")
                                [ Value.Integer IntegerKind.Usize 10 ]
                                [],
                              "next",
                              []
                            |),
                            [ M.read (| bytes |) ]
                          |);
                          M.get_trait_method (|
                            "core::convert::From",
                            Ty.path "char",
                            [ Ty.path "u8" ],
                            "from",
                            []
                          |)
                        ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "core::char::EscapeDebugInner::Char",
                        0
                      |) in
                    let chr := M.copy (| γ0_0 |) in
                    let~ _ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_associated_function (|
                            Ty.path "core::char::EscapeDebug",
                            "clear",
                            []
                          |),
                          [ M.read (| self |) ]
                        |)
                      |) in
                    M.alloc (|
                      Value.StructTuple "core::option::Option::Some" [ M.read (| chr |) ]
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn size_hint(&self) -> (usize, Option<usize>) {
            let n = self.len();
            (n, Some(n))
        }
    *)
    Definition size_hint (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (|
            let~ n :=
              M.alloc (|
                M.call_closure (|
                  M.get_trait_method (|
                    "core::iter::traits::exact_size::ExactSizeIterator",
                    Ty.path "core::char::EscapeDebug",
                    [],
                    "len",
                    []
                  |),
                  [ M.read (| self |) ]
                |)
              |) in
            M.alloc (|
              Value.Tuple
                [ M.read (| n |); Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ]
                ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn count(self) -> usize {
            self.len()
        }
    *)
    Definition count (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::exact_size::ExactSizeIterator",
              Ty.path "core::char::EscapeDebug",
              [],
              "len",
              []
            |),
            [ self ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::iterator::Iterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [
          ("Item", InstanceField.Ty _Item);
          ("next", InstanceField.Method next);
          ("size_hint", InstanceField.Method size_hint);
          ("count", InstanceField.Method count)
        ].
  End Impl_core_iter_traits_iterator_Iterator_for_core_char_EscapeDebug.
  
  Module Impl_core_iter_traits_exact_size_ExactSizeIterator_for_core_char_EscapeDebug.
    Definition Self : Ty.t := Ty.path "core::char::EscapeDebug".
    
    (*
        fn len(&self) -> usize {
            match &self.0 {
                EscapeDebugInner::Bytes(bytes) => bytes.len(),
                EscapeDebugInner::Char(_) => 1,
            }
        }
    *)
    Definition len (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (|
            M.match_operator (|
              M.alloc (|
                M.SubPointer.get_struct_tuple_field (|
                  M.read (| self |),
                  "core::char::EscapeDebug",
                  0
                |)
              |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "core::char::EscapeDebugInner::Bytes",
                        0
                      |) in
                    let bytes := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.apply
                            (Ty.path "core::escape::EscapeIterInner")
                            [ Value.Integer IntegerKind.Usize 10 ]
                            [],
                          "len",
                          []
                        |),
                        [ M.read (| bytes |) ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "core::char::EscapeDebugInner::Char",
                        0
                      |) in
                    M.alloc (| Value.Integer IntegerKind.Usize 1 |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::exact_size::ExactSizeIterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("len", InstanceField.Method len) ].
  End Impl_core_iter_traits_exact_size_ExactSizeIterator_for_core_char_EscapeDebug.
  
  Module Impl_core_iter_traits_marker_FusedIterator_for_core_char_EscapeDebug.
    Definition Self : Ty.t := Ty.path "core::char::EscapeDebug".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::marker::FusedIterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_iter_traits_marker_FusedIterator_for_core_char_EscapeDebug.
  
  Module Impl_core_fmt_Display_for_core_char_EscapeDebug.
    Definition Self : Ty.t := Ty.path "core::char::EscapeDebug".
    
    (*
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            match &self.0 {
                EscapeDebugInner::Bytes(bytes) => f.write_str(bytes.as_str()),
                EscapeDebugInner::Char(chr) => f.write_char( *chr),
            }
        }
    *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.read (|
            M.match_operator (|
              M.alloc (|
                M.SubPointer.get_struct_tuple_field (|
                  M.read (| self |),
                  "core::char::EscapeDebug",
                  0
                |)
              |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "core::char::EscapeDebugInner::Bytes",
                        0
                      |) in
                    let bytes := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::Formatter",
                          "write_str",
                          []
                        |),
                        [
                          M.read (| f |);
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.apply
                                (Ty.path "core::escape::EscapeIterInner")
                                [ Value.Integer IntegerKind.Usize 10 ]
                                [],
                              "as_str",
                              []
                            |),
                            [ M.read (| bytes |) ]
                          |)
                        ]
                      |)
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ := M.read (| γ |) in
                    let γ1_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "core::char::EscapeDebugInner::Char",
                        0
                      |) in
                    let chr := M.alloc (| γ1_0 |) in
                    M.alloc (|
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::fmt::Write",
                          Ty.path "core::fmt::Formatter",
                          [],
                          "write_char",
                          []
                        |),
                        [ M.read (| f |); M.read (| M.read (| chr |) |) ]
                      |)
                    |)))
              ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Display"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Display_for_core_char_EscapeDebug.
  
  (* StructTuple
    {
      name := "ToLowercase";
      const_params := [];
      ty_params := [];
      fields := [ Ty.path "core::char::CaseMappingIter" ];
    } *)
  
  Module Impl_core_fmt_Debug_for_core_char_ToLowercase.
    Definition Self : Ty.t := Ty.path "core::char::ToLowercase".
    
    (*         Debug *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::Formatter",
              "debug_tuple_field1_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "ToLowercase" |);
              M.alloc (|
                M.SubPointer.get_struct_tuple_field (|
                  M.read (| self |),
                  "core::char::ToLowercase",
                  0
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_core_char_ToLowercase.
  
  Module Impl_core_clone_Clone_for_core_char_ToLowercase.
    Definition Self : Ty.t := Ty.path "core::char::ToLowercase".
    
    (*         Clone *)
    Definition clone (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          Value.StructTuple
            "core::char::ToLowercase"
            [
              M.call_closure (|
                M.get_trait_method (|
                  "core::clone::Clone",
                  Ty.path "core::char::CaseMappingIter",
                  [],
                  "clone",
                  []
                |),
                [
                  M.SubPointer.get_struct_tuple_field (|
                    M.read (| self |),
                    "core::char::ToLowercase",
                    0
                  |)
                ]
              |)
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_core_char_ToLowercase.
  
  Module Impl_core_iter_traits_iterator_Iterator_for_core_char_ToLowercase.
    Definition Self : Ty.t := Ty.path "core::char::ToLowercase".
    
    (*             type Item = char; *)
    Definition _Item : Ty.t := Ty.path "char".
    
    (*
                fn next(&mut self) -> Option<char> {
                    self.0.next()
                }
    *)
    Definition next (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "next",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToLowercase",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                fn size_hint(&self) -> (usize, Option<usize>) {
                    self.0.size_hint()
                }
    *)
    Definition size_hint (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "size_hint",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToLowercase",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                fn fold<Acc, Fold>(self, init: Acc, fold: Fold) -> Acc
                where
                    Fold: FnMut(Acc, Self::Item) -> Acc,
                {
                    self.0.fold(init, fold)
                }
    *)
    Definition fold (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [ Acc; Fold ], [ self; init; fold ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let init := M.alloc (| init |) in
          let fold := M.alloc (| fold |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "fold",
              [ Acc; Fold ]
            |),
            [
              M.read (|
                M.SubPointer.get_struct_tuple_field (| self, "core::char::ToLowercase", 0 |)
              |);
              M.read (| init |);
              M.read (| fold |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                fn count(self) -> usize {
                    self.0.count()
                }
    *)
    Definition count (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "count",
              []
            |),
            [
              M.read (|
                M.SubPointer.get_struct_tuple_field (| self, "core::char::ToLowercase", 0 |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                fn last(self) -> Option<Self::Item> {
                    self.0.last()
                }
    *)
    Definition last (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "last",
              []
            |),
            [
              M.read (|
                M.SubPointer.get_struct_tuple_field (| self, "core::char::ToLowercase", 0 |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>> {
                    self.0.advance_by(n)
                }
    *)
    Definition advance_by (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; n ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let n := M.alloc (| n |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "advance_by",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToLowercase",
                0
              |);
              M.read (| n |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> Self::Item {
                    // SAFETY: just forwarding requirements to caller
                    unsafe { self.0.__iterator_get_unchecked(idx) }
                }
    *)
    Definition __iterator_get_unchecked (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; idx ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let idx := M.alloc (| idx |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "__iterator_get_unchecked",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToLowercase",
                0
              |);
              M.read (| idx |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::iterator::Iterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [
          ("Item", InstanceField.Ty _Item);
          ("next", InstanceField.Method next);
          ("size_hint", InstanceField.Method size_hint);
          ("fold", InstanceField.Method fold);
          ("count", InstanceField.Method count);
          ("last", InstanceField.Method last);
          ("advance_by", InstanceField.Method advance_by);
          ("__iterator_get_unchecked", InstanceField.Method __iterator_get_unchecked)
        ].
  End Impl_core_iter_traits_iterator_Iterator_for_core_char_ToLowercase.
  
  Module Impl_core_iter_traits_double_ended_DoubleEndedIterator_for_core_char_ToLowercase.
    Definition Self : Ty.t := Ty.path "core::char::ToLowercase".
    
    (*
                fn next_back(&mut self) -> Option<char> {
                    self.0.next_back()
                }
    *)
    Definition next_back (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::double_ended::DoubleEndedIterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "next_back",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToLowercase",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                fn rfold<Acc, Fold>(self, init: Acc, rfold: Fold) -> Acc
                where
                    Fold: FnMut(Acc, Self::Item) -> Acc,
                {
                    self.0.rfold(init, rfold)
                }
    *)
    Definition rfold (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [ Acc; Fold ], [ self; init; rfold ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let init := M.alloc (| init |) in
          let rfold := M.alloc (| rfold |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::double_ended::DoubleEndedIterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "rfold",
              [ Acc; Fold ]
            |),
            [
              M.read (|
                M.SubPointer.get_struct_tuple_field (| self, "core::char::ToLowercase", 0 |)
              |);
              M.read (| init |);
              M.read (| rfold |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>> {
                    self.0.advance_back_by(n)
                }
    *)
    Definition advance_back_by (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; n ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let n := M.alloc (| n |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::double_ended::DoubleEndedIterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "advance_back_by",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToLowercase",
                0
              |);
              M.read (| n |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::double_ended::DoubleEndedIterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [
          ("next_back", InstanceField.Method next_back);
          ("rfold", InstanceField.Method rfold);
          ("advance_back_by", InstanceField.Method advance_back_by)
        ].
  End Impl_core_iter_traits_double_ended_DoubleEndedIterator_for_core_char_ToLowercase.
  
  Module Impl_core_iter_traits_marker_FusedIterator_for_core_char_ToLowercase.
    Definition Self : Ty.t := Ty.path "core::char::ToLowercase".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::marker::FusedIterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_iter_traits_marker_FusedIterator_for_core_char_ToLowercase.
  
  Module Impl_core_iter_traits_exact_size_ExactSizeIterator_for_core_char_ToLowercase.
    Definition Self : Ty.t := Ty.path "core::char::ToLowercase".
    
    (*
                fn len(&self) -> usize {
                    self.0.len()
                }
    *)
    Definition len (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::exact_size::ExactSizeIterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "len",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToLowercase",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                fn is_empty(&self) -> bool {
                    self.0.is_empty()
                }
    *)
    Definition is_empty (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::exact_size::ExactSizeIterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "is_empty",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToLowercase",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::exact_size::ExactSizeIterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [ ("len", InstanceField.Method len); ("is_empty", InstanceField.Method is_empty) ].
  End Impl_core_iter_traits_exact_size_ExactSizeIterator_for_core_char_ToLowercase.
  
  Module Impl_core_iter_traits_marker_TrustedLen_for_core_char_ToLowercase.
    Definition Self : Ty.t := Ty.path "core::char::ToLowercase".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::marker::TrustedLen"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_iter_traits_marker_TrustedLen_for_core_char_ToLowercase.
  
  Module Impl_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_for_core_char_ToLowercase.
    Definition Self : Ty.t := Ty.path "core::char::ToLowercase".
    
    (*             const MAY_HAVE_SIDE_EFFECT: bool = false; *)
    (* Ty.path "bool" *)
    Definition value_MAY_HAVE_SIDE_EFFECT : Value.t :=
      M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))).
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::adapters::zip::TrustedRandomAccessNoCoerce"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [ ("value_MAY_HAVE_SIDE_EFFECT", InstanceField.Constant value_MAY_HAVE_SIDE_EFFECT) ].
  End Impl_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_for_core_char_ToLowercase.
  
  Module Impl_core_iter_adapters_zip_TrustedRandomAccess_for_core_char_ToLowercase.
    Definition Self : Ty.t := Ty.path "core::char::ToLowercase".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::adapters::zip::TrustedRandomAccess"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_iter_adapters_zip_TrustedRandomAccess_for_core_char_ToLowercase.
  
  Module Impl_core_fmt_Display_for_core_char_ToLowercase.
    Definition Self : Ty.t := Ty.path "core::char::ToLowercase".
    
    (*
                fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
                    fmt::Display::fmt(&self.0, f)
                }
    *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::fmt::Display",
              Ty.path "core::char::CaseMappingIter",
              [],
              "fmt",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToLowercase",
                0
              |);
              M.read (| f |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Display"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Display_for_core_char_ToLowercase.
  
  (* StructTuple
    {
      name := "ToUppercase";
      const_params := [];
      ty_params := [];
      fields := [ Ty.path "core::char::CaseMappingIter" ];
    } *)
  
  Module Impl_core_fmt_Debug_for_core_char_ToUppercase.
    Definition Self : Ty.t := Ty.path "core::char::ToUppercase".
    
    (*         Debug *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::Formatter",
              "debug_tuple_field1_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "ToUppercase" |);
              M.alloc (|
                M.SubPointer.get_struct_tuple_field (|
                  M.read (| self |),
                  "core::char::ToUppercase",
                  0
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_core_char_ToUppercase.
  
  Module Impl_core_clone_Clone_for_core_char_ToUppercase.
    Definition Self : Ty.t := Ty.path "core::char::ToUppercase".
    
    (*         Clone *)
    Definition clone (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          Value.StructTuple
            "core::char::ToUppercase"
            [
              M.call_closure (|
                M.get_trait_method (|
                  "core::clone::Clone",
                  Ty.path "core::char::CaseMappingIter",
                  [],
                  "clone",
                  []
                |),
                [
                  M.SubPointer.get_struct_tuple_field (|
                    M.read (| self |),
                    "core::char::ToUppercase",
                    0
                  |)
                ]
              |)
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_core_char_ToUppercase.
  
  Module Impl_core_iter_traits_iterator_Iterator_for_core_char_ToUppercase.
    Definition Self : Ty.t := Ty.path "core::char::ToUppercase".
    
    (*             type Item = char; *)
    Definition _Item : Ty.t := Ty.path "char".
    
    (*
                fn next(&mut self) -> Option<char> {
                    self.0.next()
                }
    *)
    Definition next (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "next",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToUppercase",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                fn size_hint(&self) -> (usize, Option<usize>) {
                    self.0.size_hint()
                }
    *)
    Definition size_hint (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "size_hint",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToUppercase",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                fn fold<Acc, Fold>(self, init: Acc, fold: Fold) -> Acc
                where
                    Fold: FnMut(Acc, Self::Item) -> Acc,
                {
                    self.0.fold(init, fold)
                }
    *)
    Definition fold (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [ Acc; Fold ], [ self; init; fold ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let init := M.alloc (| init |) in
          let fold := M.alloc (| fold |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "fold",
              [ Acc; Fold ]
            |),
            [
              M.read (|
                M.SubPointer.get_struct_tuple_field (| self, "core::char::ToUppercase", 0 |)
              |);
              M.read (| init |);
              M.read (| fold |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                fn count(self) -> usize {
                    self.0.count()
                }
    *)
    Definition count (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "count",
              []
            |),
            [
              M.read (|
                M.SubPointer.get_struct_tuple_field (| self, "core::char::ToUppercase", 0 |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                fn last(self) -> Option<Self::Item> {
                    self.0.last()
                }
    *)
    Definition last (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "last",
              []
            |),
            [
              M.read (|
                M.SubPointer.get_struct_tuple_field (| self, "core::char::ToUppercase", 0 |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>> {
                    self.0.advance_by(n)
                }
    *)
    Definition advance_by (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; n ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let n := M.alloc (| n |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "advance_by",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToUppercase",
                0
              |);
              M.read (| n |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> Self::Item {
                    // SAFETY: just forwarding requirements to caller
                    unsafe { self.0.__iterator_get_unchecked(idx) }
                }
    *)
    Definition __iterator_get_unchecked (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; idx ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let idx := M.alloc (| idx |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "__iterator_get_unchecked",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToUppercase",
                0
              |);
              M.read (| idx |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::iterator::Iterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [
          ("Item", InstanceField.Ty _Item);
          ("next", InstanceField.Method next);
          ("size_hint", InstanceField.Method size_hint);
          ("fold", InstanceField.Method fold);
          ("count", InstanceField.Method count);
          ("last", InstanceField.Method last);
          ("advance_by", InstanceField.Method advance_by);
          ("__iterator_get_unchecked", InstanceField.Method __iterator_get_unchecked)
        ].
  End Impl_core_iter_traits_iterator_Iterator_for_core_char_ToUppercase.
  
  Module Impl_core_iter_traits_double_ended_DoubleEndedIterator_for_core_char_ToUppercase.
    Definition Self : Ty.t := Ty.path "core::char::ToUppercase".
    
    (*
                fn next_back(&mut self) -> Option<char> {
                    self.0.next_back()
                }
    *)
    Definition next_back (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::double_ended::DoubleEndedIterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "next_back",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToUppercase",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                fn rfold<Acc, Fold>(self, init: Acc, rfold: Fold) -> Acc
                where
                    Fold: FnMut(Acc, Self::Item) -> Acc,
                {
                    self.0.rfold(init, rfold)
                }
    *)
    Definition rfold (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [ Acc; Fold ], [ self; init; rfold ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let init := M.alloc (| init |) in
          let rfold := M.alloc (| rfold |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::double_ended::DoubleEndedIterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "rfold",
              [ Acc; Fold ]
            |),
            [
              M.read (|
                M.SubPointer.get_struct_tuple_field (| self, "core::char::ToUppercase", 0 |)
              |);
              M.read (| init |);
              M.read (| rfold |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>> {
                    self.0.advance_back_by(n)
                }
    *)
    Definition advance_back_by (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; n ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let n := M.alloc (| n |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::double_ended::DoubleEndedIterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "advance_back_by",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToUppercase",
                0
              |);
              M.read (| n |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::double_ended::DoubleEndedIterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [
          ("next_back", InstanceField.Method next_back);
          ("rfold", InstanceField.Method rfold);
          ("advance_back_by", InstanceField.Method advance_back_by)
        ].
  End Impl_core_iter_traits_double_ended_DoubleEndedIterator_for_core_char_ToUppercase.
  
  Module Impl_core_iter_traits_marker_FusedIterator_for_core_char_ToUppercase.
    Definition Self : Ty.t := Ty.path "core::char::ToUppercase".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::marker::FusedIterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_iter_traits_marker_FusedIterator_for_core_char_ToUppercase.
  
  Module Impl_core_iter_traits_exact_size_ExactSizeIterator_for_core_char_ToUppercase.
    Definition Self : Ty.t := Ty.path "core::char::ToUppercase".
    
    (*
                fn len(&self) -> usize {
                    self.0.len()
                }
    *)
    Definition len (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::exact_size::ExactSizeIterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "len",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToUppercase",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
                fn is_empty(&self) -> bool {
                    self.0.is_empty()
                }
    *)
    Definition is_empty (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::exact_size::ExactSizeIterator",
              Ty.path "core::char::CaseMappingIter",
              [],
              "is_empty",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToUppercase",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::exact_size::ExactSizeIterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [ ("len", InstanceField.Method len); ("is_empty", InstanceField.Method is_empty) ].
  End Impl_core_iter_traits_exact_size_ExactSizeIterator_for_core_char_ToUppercase.
  
  Module Impl_core_iter_traits_marker_TrustedLen_for_core_char_ToUppercase.
    Definition Self : Ty.t := Ty.path "core::char::ToUppercase".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::marker::TrustedLen"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_iter_traits_marker_TrustedLen_for_core_char_ToUppercase.
  
  Module Impl_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_for_core_char_ToUppercase.
    Definition Self : Ty.t := Ty.path "core::char::ToUppercase".
    
    (*             const MAY_HAVE_SIDE_EFFECT: bool = false; *)
    (* Ty.path "bool" *)
    Definition value_MAY_HAVE_SIDE_EFFECT : Value.t :=
      M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))).
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::adapters::zip::TrustedRandomAccessNoCoerce"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [ ("value_MAY_HAVE_SIDE_EFFECT", InstanceField.Constant value_MAY_HAVE_SIDE_EFFECT) ].
  End Impl_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_for_core_char_ToUppercase.
  
  Module Impl_core_iter_adapters_zip_TrustedRandomAccess_for_core_char_ToUppercase.
    Definition Self : Ty.t := Ty.path "core::char::ToUppercase".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::adapters::zip::TrustedRandomAccess"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_iter_adapters_zip_TrustedRandomAccess_for_core_char_ToUppercase.
  
  Module Impl_core_fmt_Display_for_core_char_ToUppercase.
    Definition Self : Ty.t := Ty.path "core::char::ToUppercase".
    
    (*
                fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
                    fmt::Display::fmt(&self.0, f)
                }
    *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::fmt::Display",
              Ty.path "core::char::CaseMappingIter",
              [],
              "fmt",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::ToUppercase",
                0
              |);
              M.read (| f |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Display"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Display_for_core_char_ToUppercase.
  
  (* StructTuple
    {
      name := "CaseMappingIter";
      const_params := [];
      ty_params := [];
      fields :=
        [
          Ty.apply
            (Ty.path "core::array::iter::IntoIter")
            [ Value.Integer IntegerKind.Usize 3 ]
            [ Ty.path "char" ]
        ];
    } *)
  
  Module Impl_core_fmt_Debug_for_core_char_CaseMappingIter.
    Definition Self : Ty.t := Ty.path "core::char::CaseMappingIter".
    
    (* Debug *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::Formatter",
              "debug_tuple_field1_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "CaseMappingIter" |);
              M.alloc (|
                M.SubPointer.get_struct_tuple_field (|
                  M.read (| self |),
                  "core::char::CaseMappingIter",
                  0
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_core_char_CaseMappingIter.
  
  Module Impl_core_clone_Clone_for_core_char_CaseMappingIter.
    Definition Self : Ty.t := Ty.path "core::char::CaseMappingIter".
    
    (* Clone *)
    Definition clone (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          Value.StructTuple
            "core::char::CaseMappingIter"
            [
              M.call_closure (|
                M.get_trait_method (|
                  "core::clone::Clone",
                  Ty.apply
                    (Ty.path "core::array::iter::IntoIter")
                    [ Value.Integer IntegerKind.Usize 3 ]
                    [ Ty.path "char" ],
                  [],
                  "clone",
                  []
                |),
                [
                  M.SubPointer.get_struct_tuple_field (|
                    M.read (| self |),
                    "core::char::CaseMappingIter",
                    0
                  |)
                ]
              |)
            ]))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_core_char_CaseMappingIter.
  
  Module Impl_core_char_CaseMappingIter.
    Definition Self : Ty.t := Ty.path "core::char::CaseMappingIter".
    
    (*
        fn new(chars: [char; 3]) -> CaseMappingIter {
            let mut iter = chars.into_iter();
            if chars[2] == '\0' {
                iter.next_back();
                if chars[1] == '\0' {
                    iter.next_back();
    
                    // Deliberately don't check `chars[0]`,
                    // as '\0' lowercases to itself
                }
            }
            CaseMappingIter(iter)
        }
    *)
    Definition new (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ chars ] =>
        ltac:(M.monadic
          (let chars := M.alloc (| chars |) in
          M.read (|
            let~ iter :=
              M.alloc (|
                M.call_closure (|
                  M.get_trait_method (|
                    "core::iter::traits::collect::IntoIterator",
                    Ty.apply
                      (Ty.path "array")
                      [ Value.Integer IntegerKind.Usize 3 ]
                      [ Ty.path "char" ],
                    [],
                    "into_iter",
                    []
                  |),
                  [ M.read (| chars |) ]
                |)
              |) in
            let~ _ :=
              M.match_operator (|
                M.alloc (| Value.Tuple [] |),
                [
                  fun γ =>
                    ltac:(M.monadic
                      (let γ :=
                        M.use
                          (M.alloc (|
                            BinOp.eq (|
                              M.read (|
                                M.SubPointer.get_array_field (|
                                  chars,
                                  M.alloc (| Value.Integer IntegerKind.Usize 2 |)
                                |)
                              |),
                              Value.UnicodeChar 0
                            |)
                          |)) in
                      let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                      let~ _ :=
                        M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::iter::traits::double_ended::DoubleEndedIterator",
                              Ty.apply
                                (Ty.path "core::array::iter::IntoIter")
                                [ Value.Integer IntegerKind.Usize 3 ]
                                [ Ty.path "char" ],
                              [],
                              "next_back",
                              []
                            |),
                            [ iter ]
                          |)
                        |) in
                      M.match_operator (|
                        M.alloc (| Value.Tuple [] |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ :=
                                M.use
                                  (M.alloc (|
                                    BinOp.eq (|
                                      M.read (|
                                        M.SubPointer.get_array_field (|
                                          chars,
                                          M.alloc (| Value.Integer IntegerKind.Usize 1 |)
                                        |)
                                      |),
                                      Value.UnicodeChar 0
                                    |)
                                  |)) in
                              let _ :=
                                M.is_constant_or_break_match (|
                                  M.read (| γ |),
                                  Value.Bool true
                                |) in
                              let~ _ :=
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::iter::traits::double_ended::DoubleEndedIterator",
                                      Ty.apply
                                        (Ty.path "core::array::iter::IntoIter")
                                        [ Value.Integer IntegerKind.Usize 3 ]
                                        [ Ty.path "char" ],
                                      [],
                                      "next_back",
                                      []
                                    |),
                                    [ iter ]
                                  |)
                                |) in
                              M.alloc (| Value.Tuple [] |)));
                          fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                        ]
                      |)));
                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                ]
              |) in
            M.alloc (| Value.StructTuple "core::char::CaseMappingIter" [ M.read (| iter |) ] |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new.
  End Impl_core_char_CaseMappingIter.
  
  Module Impl_core_iter_traits_iterator_Iterator_for_core_char_CaseMappingIter.
    Definition Self : Ty.t := Ty.path "core::char::CaseMappingIter".
    
    (*     type Item = char; *)
    Definition _Item : Ty.t := Ty.path "char".
    
    (*
        fn next(&mut self) -> Option<char> {
            self.0.next()
        }
    *)
    Definition next (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.apply
                (Ty.path "core::array::iter::IntoIter")
                [ Value.Integer IntegerKind.Usize 3 ]
                [ Ty.path "char" ],
              [],
              "next",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::CaseMappingIter",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn size_hint(&self) -> (usize, Option<usize>) {
            self.0.size_hint()
        }
    *)
    Definition size_hint (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.apply
                (Ty.path "core::array::iter::IntoIter")
                [ Value.Integer IntegerKind.Usize 3 ]
                [ Ty.path "char" ],
              [],
              "size_hint",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::CaseMappingIter",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn fold<Acc, Fold>(self, init: Acc, fold: Fold) -> Acc
        where
            Fold: FnMut(Acc, Self::Item) -> Acc,
        {
            self.0.fold(init, fold)
        }
    *)
    Definition fold (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [ Acc; Fold ], [ self; init; fold ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let init := M.alloc (| init |) in
          let fold := M.alloc (| fold |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.apply
                (Ty.path "core::array::iter::IntoIter")
                [ Value.Integer IntegerKind.Usize 3 ]
                [ Ty.path "char" ],
              [],
              "fold",
              [ Acc; Fold ]
            |),
            [
              M.read (|
                M.SubPointer.get_struct_tuple_field (| self, "core::char::CaseMappingIter", 0 |)
              |);
              M.read (| init |);
              M.read (| fold |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn count(self) -> usize {
            self.0.count()
        }
    *)
    Definition count (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.apply
                (Ty.path "core::array::iter::IntoIter")
                [ Value.Integer IntegerKind.Usize 3 ]
                [ Ty.path "char" ],
              [],
              "count",
              []
            |),
            [
              M.read (|
                M.SubPointer.get_struct_tuple_field (| self, "core::char::CaseMappingIter", 0 |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn last(self) -> Option<Self::Item> {
            self.0.last()
        }
    *)
    Definition last (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.apply
                (Ty.path "core::array::iter::IntoIter")
                [ Value.Integer IntegerKind.Usize 3 ]
                [ Ty.path "char" ],
              [],
              "last",
              []
            |),
            [
              M.read (|
                M.SubPointer.get_struct_tuple_field (| self, "core::char::CaseMappingIter", 0 |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>> {
            self.0.advance_by(n)
        }
    *)
    Definition advance_by (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; n ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let n := M.alloc (| n |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.apply
                (Ty.path "core::array::iter::IntoIter")
                [ Value.Integer IntegerKind.Usize 3 ]
                [ Ty.path "char" ],
              [],
              "advance_by",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::CaseMappingIter",
                0
              |);
              M.read (| n |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> Self::Item {
            // SAFETY: just forwarding requirements to caller
            unsafe { self.0.__iterator_get_unchecked(idx) }
        }
    *)
    Definition __iterator_get_unchecked (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; idx ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let idx := M.alloc (| idx |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::iterator::Iterator",
              Ty.apply
                (Ty.path "core::array::iter::IntoIter")
                [ Value.Integer IntegerKind.Usize 3 ]
                [ Ty.path "char" ],
              [],
              "__iterator_get_unchecked",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::CaseMappingIter",
                0
              |);
              M.read (| idx |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::iterator::Iterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [
          ("Item", InstanceField.Ty _Item);
          ("next", InstanceField.Method next);
          ("size_hint", InstanceField.Method size_hint);
          ("fold", InstanceField.Method fold);
          ("count", InstanceField.Method count);
          ("last", InstanceField.Method last);
          ("advance_by", InstanceField.Method advance_by);
          ("__iterator_get_unchecked", InstanceField.Method __iterator_get_unchecked)
        ].
  End Impl_core_iter_traits_iterator_Iterator_for_core_char_CaseMappingIter.
  
  Module Impl_core_iter_traits_double_ended_DoubleEndedIterator_for_core_char_CaseMappingIter.
    Definition Self : Ty.t := Ty.path "core::char::CaseMappingIter".
    
    (*
        fn next_back(&mut self) -> Option<char> {
            self.0.next_back()
        }
    *)
    Definition next_back (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::double_ended::DoubleEndedIterator",
              Ty.apply
                (Ty.path "core::array::iter::IntoIter")
                [ Value.Integer IntegerKind.Usize 3 ]
                [ Ty.path "char" ],
              [],
              "next_back",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::CaseMappingIter",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn rfold<Acc, Fold>(self, init: Acc, rfold: Fold) -> Acc
        where
            Fold: FnMut(Acc, Self::Item) -> Acc,
        {
            self.0.rfold(init, rfold)
        }
    *)
    Definition rfold (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [ Acc; Fold ], [ self; init; rfold ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let init := M.alloc (| init |) in
          let rfold := M.alloc (| rfold |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::double_ended::DoubleEndedIterator",
              Ty.apply
                (Ty.path "core::array::iter::IntoIter")
                [ Value.Integer IntegerKind.Usize 3 ]
                [ Ty.path "char" ],
              [],
              "rfold",
              [ Acc; Fold ]
            |),
            [
              M.read (|
                M.SubPointer.get_struct_tuple_field (| self, "core::char::CaseMappingIter", 0 |)
              |);
              M.read (| init |);
              M.read (| rfold |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>> {
            self.0.advance_back_by(n)
        }
    *)
    Definition advance_back_by (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; n ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let n := M.alloc (| n |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::double_ended::DoubleEndedIterator",
              Ty.apply
                (Ty.path "core::array::iter::IntoIter")
                [ Value.Integer IntegerKind.Usize 3 ]
                [ Ty.path "char" ],
              [],
              "advance_back_by",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::CaseMappingIter",
                0
              |);
              M.read (| n |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::double_ended::DoubleEndedIterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [
          ("next_back", InstanceField.Method next_back);
          ("rfold", InstanceField.Method rfold);
          ("advance_back_by", InstanceField.Method advance_back_by)
        ].
  End Impl_core_iter_traits_double_ended_DoubleEndedIterator_for_core_char_CaseMappingIter.
  
  Module Impl_core_iter_traits_exact_size_ExactSizeIterator_for_core_char_CaseMappingIter.
    Definition Self : Ty.t := Ty.path "core::char::CaseMappingIter".
    
    (*
        fn len(&self) -> usize {
            self.0.len()
        }
    *)
    Definition len (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::exact_size::ExactSizeIterator",
              Ty.apply
                (Ty.path "core::array::iter::IntoIter")
                [ Value.Integer IntegerKind.Usize 3 ]
                [ Ty.path "char" ],
              [],
              "len",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::CaseMappingIter",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    (*
        fn is_empty(&self) -> bool {
            self.0.is_empty()
        }
    *)
    Definition is_empty (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::iter::traits::exact_size::ExactSizeIterator",
              Ty.apply
                (Ty.path "core::array::iter::IntoIter")
                [ Value.Integer IntegerKind.Usize 3 ]
                [ Ty.path "char" ],
              [],
              "is_empty",
              []
            |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::CaseMappingIter",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::exact_size::ExactSizeIterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [ ("len", InstanceField.Method len); ("is_empty", InstanceField.Method is_empty) ].
  End Impl_core_iter_traits_exact_size_ExactSizeIterator_for_core_char_CaseMappingIter.
  
  Module Impl_core_iter_traits_marker_FusedIterator_for_core_char_CaseMappingIter.
    Definition Self : Ty.t := Ty.path "core::char::CaseMappingIter".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::marker::FusedIterator"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_iter_traits_marker_FusedIterator_for_core_char_CaseMappingIter.
  
  Module Impl_core_iter_traits_marker_TrustedLen_for_core_char_CaseMappingIter.
    Definition Self : Ty.t := Ty.path "core::char::CaseMappingIter".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::traits::marker::TrustedLen"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_iter_traits_marker_TrustedLen_for_core_char_CaseMappingIter.
  
  Module Impl_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_for_core_char_CaseMappingIter.
    Definition Self : Ty.t := Ty.path "core::char::CaseMappingIter".
    
    (*     const MAY_HAVE_SIDE_EFFECT: bool = false; *)
    (* Ty.path "bool" *)
    Definition value_MAY_HAVE_SIDE_EFFECT : Value.t :=
      M.run ltac:(M.monadic (M.alloc (| Value.Bool false |))).
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::adapters::zip::TrustedRandomAccessNoCoerce"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [ ("value_MAY_HAVE_SIDE_EFFECT", InstanceField.Constant value_MAY_HAVE_SIDE_EFFECT) ].
  End Impl_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_for_core_char_CaseMappingIter.
  
  Module Impl_core_iter_adapters_zip_TrustedRandomAccess_for_core_char_CaseMappingIter.
    Definition Self : Ty.t := Ty.path "core::char::CaseMappingIter".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::iter::adapters::zip::TrustedRandomAccess"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_iter_adapters_zip_TrustedRandomAccess_for_core_char_CaseMappingIter.
  
  Module Impl_core_fmt_Display_for_core_char_CaseMappingIter.
    Definition Self : Ty.t := Ty.path "core::char::CaseMappingIter".
    
    (*
        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
            for c in self.0.clone() {
                f.write_char(c)?;
            }
            Ok(())
        }
    *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.catch_return (|
            ltac:(M.monadic
              (M.read (|
                let~ _ :=
                  M.use
                    (M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::iter::traits::collect::IntoIterator",
                            Ty.apply
                              (Ty.path "core::array::iter::IntoIter")
                              [ Value.Integer IntegerKind.Usize 3 ]
                              [ Ty.path "char" ],
                            [],
                            "into_iter",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::clone::Clone",
                                Ty.apply
                                  (Ty.path "core::array::iter::IntoIter")
                                  [ Value.Integer IntegerKind.Usize 3 ]
                                  [ Ty.path "char" ],
                                [],
                                "clone",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_tuple_field (|
                                  M.read (| self |),
                                  "core::char::CaseMappingIter",
                                  0
                                |)
                              ]
                            |)
                          ]
                        |)
                      |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let iter := M.copy (| γ |) in
                            M.loop (|
                              ltac:(M.monadic
                                (let~ _ :=
                                  M.match_operator (|
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::iter::traits::iterator::Iterator",
                                          Ty.apply
                                            (Ty.path "core::array::iter::IntoIter")
                                            [ Value.Integer IntegerKind.Usize 3 ]
                                            [ Ty.path "char" ],
                                          [],
                                          "next",
                                          []
                                        |),
                                        [ iter ]
                                      |)
                                    |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let _ :=
                                            M.is_struct_tuple (|
                                              γ,
                                              "core::option::Option::None"
                                            |) in
                                          M.alloc (|
                                            M.never_to_any (| M.read (| M.break (||) |) |)
                                          |)));
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ0_0 :=
                                            M.SubPointer.get_struct_tuple_field (|
                                              γ,
                                              "core::option::Option::Some",
                                              0
                                            |) in
                                          let c := M.copy (| γ0_0 |) in
                                          let~ _ :=
                                            M.match_operator (|
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::ops::try_trait::Try",
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      []
                                                      [ Ty.tuple []; Ty.path "core::fmt::Error" ],
                                                    [],
                                                    "branch",
                                                    []
                                                  |),
                                                  [
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::fmt::Write",
                                                        Ty.path "core::fmt::Formatter",
                                                        [],
                                                        "write_char",
                                                        []
                                                      |),
                                                      [ M.read (| f |); M.read (| c |) ]
                                                    |)
                                                  ]
                                                |)
                                              |),
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ0_0 :=
                                                      M.SubPointer.get_struct_tuple_field (|
                                                        γ,
                                                        "core::ops::control_flow::ControlFlow::Break",
                                                        0
                                                      |) in
                                                    let residual := M.copy (| γ0_0 |) in
                                                    M.alloc (|
                                                      M.never_to_any (|
                                                        M.read (|
                                                          M.return_ (|
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "core::ops::try_trait::FromResidual",
                                                                Ty.apply
                                                                  (Ty.path "core::result::Result")
                                                                  []
                                                                  [
                                                                    Ty.tuple [];
                                                                    Ty.path "core::fmt::Error"
                                                                  ],
                                                                [
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    []
                                                                    [
                                                                      Ty.path
                                                                        "core::convert::Infallible";
                                                                      Ty.path "core::fmt::Error"
                                                                    ]
                                                                ],
                                                                "from_residual",
                                                                []
                                                              |),
                                                              [ M.read (| residual |) ]
                                                            |)
                                                          |)
                                                        |)
                                                      |)
                                                    |)));
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (let γ0_0 :=
                                                      M.SubPointer.get_struct_tuple_field (|
                                                        γ,
                                                        "core::ops::control_flow::ControlFlow::Continue",
                                                        0
                                                      |) in
                                                    let val := M.copy (| γ0_0 |) in
                                                    val))
                                              ]
                                            |) in
                                          M.alloc (| Value.Tuple [] |)))
                                    ]
                                  |) in
                                M.alloc (| Value.Tuple [] |)))
                            |)))
                      ]
                    |)) in
                M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |)
              |)))
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Display"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Display_for_core_char_CaseMappingIter.
  
  (* StructTuple
    {
      name := "TryFromCharError";
      const_params := [];
      ty_params := [];
      fields := [ Ty.tuple [] ];
    } *)
  
  Module Impl_core_fmt_Debug_for_core_char_TryFromCharError.
    Definition Self : Ty.t := Ty.path "core::char::TryFromCharError".
    
    (* Debug *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::Formatter",
              "debug_tuple_field1_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "TryFromCharError" |);
              M.alloc (|
                M.SubPointer.get_struct_tuple_field (|
                  M.read (| self |),
                  "core::char::TryFromCharError",
                  0
                |)
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_core_char_TryFromCharError.
  
  Module Impl_core_marker_Copy_for_core_char_TryFromCharError.
    Definition Self : Ty.t := Ty.path "core::char::TryFromCharError".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_core_char_TryFromCharError.
  
  Module Impl_core_clone_Clone_for_core_char_TryFromCharError.
    Definition Self : Ty.t := Ty.path "core::char::TryFromCharError".
    
    (* Clone *)
    Definition clone (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (|
            M.match_operator (|
              Value.DeclaredButUndefined,
              [ fun γ => ltac:(M.monadic (M.read (| self |))) ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_core_char_TryFromCharError.
  
  Module Impl_core_marker_StructuralPartialEq_for_core_char_TryFromCharError.
    Definition Self : Ty.t := Ty.path "core::char::TryFromCharError".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_core_char_TryFromCharError.
  
  Module Impl_core_cmp_PartialEq_for_core_char_TryFromCharError.
    Definition Self : Ty.t := Ty.path "core::char::TryFromCharError".
    
    (* PartialEq *)
    Definition eq (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; other ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let other := M.alloc (| other |) in
          M.call_closure (|
            M.get_trait_method (| "core::cmp::PartialEq", Ty.tuple [], [ Ty.tuple [] ], "eq", [] |),
            [
              M.SubPointer.get_struct_tuple_field (|
                M.read (| self |),
                "core::char::TryFromCharError",
                0
              |);
              M.SubPointer.get_struct_tuple_field (|
                M.read (| other |),
                "core::char::TryFromCharError",
                0
              |)
            ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::PartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("eq", InstanceField.Method eq) ].
  End Impl_core_cmp_PartialEq_for_core_char_TryFromCharError.
  
  Module Impl_core_cmp_Eq_for_core_char_TryFromCharError.
    Definition Self : Ty.t := Ty.path "core::char::TryFromCharError".
    
    (* Eq *)
    Definition assert_receiver_is_total_eq
        (ε : list Value.t)
        (τ : list Ty.t)
        (α : list Value.t)
        : M :=
      match ε, τ, α with
      | [], [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (|
            M.match_operator (|
              Value.DeclaredButUndefined,
              [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ]
            |)
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::Eq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *)
        [ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ].
  End Impl_core_cmp_Eq_for_core_char_TryFromCharError.
  
  Module Impl_core_fmt_Display_for_core_char_TryFromCharError.
    Definition Self : Ty.t := Ty.path "core::char::TryFromCharError".
    
    (*
        fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
            "unicode code point out of range".fmt(fmt)
        }
    *)
    Definition fmt (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
      match ε, τ, α with
      | [], [], [ self; fmt ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let fmt := M.alloc (| fmt |) in
          M.call_closure (|
            M.get_trait_method (| "core::fmt::Display", Ty.path "str", [], "fmt", [] |),
            [ M.read (| Value.String "unicode code point out of range" |); M.read (| fmt |) ]
          |)))
      | _, _, _ => M.impossible "wrong number of arguments"
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Display"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Display_for_core_char_TryFromCharError.
  
  Module Impl_core_error_Error_for_core_char_TryFromCharError.
    Definition Self : Ty.t := Ty.path "core::char::TryFromCharError".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::error::Error"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_error_Error_for_core_char_TryFromCharError.
End char.
