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

Module iter.
  Module adapters.
    Module zip.
      (* StructRecord
        {
          name := "Zip";
          const_params := [];
          ty_params := [ "A"; "B" ];
          fields :=
            [
              ("a", A);
              ("b", B);
              ("index", Ty.path "usize");
              ("len", Ty.path "usize");
              ("a_len", Ty.path "usize")
            ];
        } *)
      
      Module Impl_core_clone_Clone_where_core_clone_Clone_A_where_core_clone_Clone_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        (* Clone *)
        Definition clone (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              Value.StructRecord
                "core::iter::adapters::zip::Zip"
                [
                  ("a",
                    M.call_closure (|
                      M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::zip::Zip",
                          "a"
                        |)
                      ]
                    |));
                  ("b",
                    M.call_closure (|
                      M.get_trait_method (| "core::clone::Clone", B, [], "clone", [] |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::zip::Zip",
                          "b"
                        |)
                      ]
                    |));
                  ("index",
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::clone::Clone",
                        Ty.path "usize",
                        [],
                        "clone",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::zip::Zip",
                          "index"
                        |)
                      ]
                    |));
                  ("len",
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::clone::Clone",
                        Ty.path "usize",
                        [],
                        "clone",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::zip::Zip",
                          "len"
                        |)
                      ]
                    |));
                  ("a_len",
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::clone::Clone",
                        Ty.path "usize",
                        [],
                        "clone",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::zip::Zip",
                          "a_len"
                        |)
                      ]
                    |))
                ]))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::clone::Clone"
            (Self A B)
            (* Trait polymorphic types *) []
            (* Instance *) [ ("clone", InstanceField.Method (clone A B)) ].
      End Impl_core_clone_Clone_where_core_clone_Clone_A_where_core_clone_Clone_B_for_core_iter_adapters_zip_Zip_A_B.
      
      Module Impl_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        (*
            pub(in crate::iter) fn new(a: A, b: B) -> Zip<A, B> {
                ZipImpl::new(a, b)
            }
        *)
        Definition new (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ a; b ] =>
            ltac:(M.monadic
              (let a := M.alloc (| a |) in
              let b := M.alloc (| b |) in
              M.call_closure (|
                M.get_trait_method (|
                  "core::iter::adapters::zip::ZipImpl",
                  Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ],
                  [ A; B ],
                  "new",
                  []
                |),
                [ M.read (| a |); M.read (| b |) ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_new :
          forall (A B : Ty.t),
          M.IsAssociatedFunction (Self A B) "new" (new A B).
        
        (*
            fn super_nth(&mut self, mut n: usize) -> Option<(A::Item, B::Item)> {
                while let Some(x) = Iterator::next(self) {
                    if n == 0 {
                        return Some(x);
                    }
                    n -= 1;
                }
                None
            }
        *)
        Definition super_nth
            (A B : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self; n ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              let n := M.alloc (| n |) in
              M.catch_return (|
                ltac:(M.monadic
                  (M.read (|
                    let~ _ :=
                      M.loop (|
                        ltac:(M.monadic
                          (M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::iter::traits::iterator::Iterator",
                                          Ty.apply
                                            (Ty.path "core::iter::adapters::zip::Zip")
                                            []
                                            [ A; B ],
                                          [],
                                          "next",
                                          []
                                        |),
                                        [ M.read (| self |) ]
                                      |)
                                    |) in
                                  let γ0_0 :=
                                    M.SubPointer.get_struct_tuple_field (|
                                      γ,
                                      "core::option::Option::Some",
                                      0
                                    |) in
                                  let x := M.copy (| γ0_0 |) in
                                  let~ _ :=
                                    M.match_operator (|
                                      M.alloc (| Value.Tuple [] |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ :=
                                              M.use
                                                (M.alloc (|
                                                  BinOp.eq (|
                                                    M.read (| n |),
                                                    Value.Integer IntegerKind.Usize 0
                                                  |)
                                                |)) in
                                            let _ :=
                                              M.is_constant_or_break_match (|
                                                M.read (| γ |),
                                                Value.Bool true
                                              |) in
                                            M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  M.return_ (|
                                                    Value.StructTuple
                                                      "core::option::Option::Some"
                                                      [ M.read (| x |) ]
                                                  |)
                                                |)
                                              |)
                                            |)));
                                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  let~ _ :=
                                    let β := n in
                                    M.write (|
                                      β,
                                      BinOp.Wrap.sub (|
                                        M.read (| β |),
                                        Value.Integer IntegerKind.Usize 1
                                      |)
                                    |) in
                                  M.alloc (| Value.Tuple [] |)));
                              fun γ =>
                                ltac:(M.monadic
                                  (M.alloc (|
                                    M.never_to_any (|
                                      M.read (|
                                        let~ _ :=
                                          M.alloc (|
                                            M.never_to_any (| M.read (| M.break (||) |) |)
                                          |) in
                                        M.alloc (| Value.Tuple [] |)
                                      |)
                                    |)
                                  |)))
                            ]
                          |)))
                      |) in
                    M.alloc (| Value.StructTuple "core::option::Option::None" [] |)
                  |)))
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom AssociatedFunction_super_nth :
          forall (A B : Ty.t),
          M.IsAssociatedFunction (Self A B) "super_nth" (super_nth A B).
      End Impl_core_iter_adapters_zip_Zip_A_B.
      
      (*
      pub fn zip<A, B>(a: A, b: B) -> Zip<A::IntoIter, B::IntoIter>
      where
          A: IntoIterator,
          B: IntoIterator,
      {
          ZipImpl::new(a.into_iter(), b.into_iter())
      }
      *)
      Definition zip (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
        match ε, τ, α with
        | [], [ A; B ], [ a; b ] =>
          ltac:(M.monadic
            (let a := M.alloc (| a |) in
            let b := M.alloc (| b |) in
            M.call_closure (|
              M.get_trait_method (|
                "core::iter::adapters::zip::ZipImpl",
                Ty.apply
                  (Ty.path "core::iter::adapters::zip::Zip")
                  []
                  [ Ty.associated; Ty.associated ],
                [ Ty.associated; Ty.associated ],
                "new",
                []
              |),
              [
                M.call_closure (|
                  M.get_trait_method (|
                    "core::iter::traits::collect::IntoIterator",
                    A,
                    [],
                    "into_iter",
                    []
                  |),
                  [ M.read (| a |) ]
                |);
                M.call_closure (|
                  M.get_trait_method (|
                    "core::iter::traits::collect::IntoIterator",
                    B,
                    [],
                    "into_iter",
                    []
                  |),
                  [ M.read (| b |) ]
                |)
              ]
            |)))
        | _, _, _ => M.impossible "wrong number of arguments"
        end.
      
      Axiom Function_zip : M.IsFunction "core::iter::adapters::zip::zip" zip.
      
      Module Impl_core_iter_traits_iterator_Iterator_where_core_iter_traits_iterator_Iterator_A_where_core_iter_traits_iterator_Iterator_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        (*     type Item = (A::Item, B::Item); *)
        Definition _Item (A B : Ty.t) : Ty.t := Ty.tuple [ Ty.associated; Ty.associated ].
        
        (*
            fn next(&mut self) -> Option<Self::Item> {
                ZipImpl::next(self)
            }
        *)
        Definition next (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.call_closure (|
                M.get_trait_method (|
                  "core::iter::adapters::zip::ZipImpl",
                  Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ],
                  [ A; B ],
                  "next",
                  []
                |),
                [ M.read (| self |) ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
            fn size_hint(&self) -> (usize, Option<usize>) {
                ZipImpl::size_hint(self)
            }
        *)
        Definition size_hint
            (A B : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.call_closure (|
                M.get_trait_method (|
                  "core::iter::adapters::zip::ZipImpl",
                  Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ],
                  [ A; B ],
                  "size_hint",
                  []
                |),
                [ M.read (| self |) ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
            fn nth(&mut self, n: usize) -> Option<Self::Item> {
                ZipImpl::nth(self, n)
            }
        *)
        Definition nth (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          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::adapters::zip::ZipImpl",
                  Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ],
                  [ A; B ],
                  "nth",
                  []
                |),
                [ M.read (| self |); M.read (| n |) ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
            fn fold<Acc, F>(self, init: Acc, f: F) -> Acc
            where
                F: FnMut(Acc, Self::Item) -> Acc,
            {
                ZipImpl::fold(self, init, f)
            }
        *)
        Definition fold (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [ Acc; F ], [ self; init; f ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              let init := M.alloc (| init |) in
              let f := M.alloc (| f |) in
              M.call_closure (|
                M.get_trait_method (|
                  "core::iter::adapters::zip::ZipImpl",
                  Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ],
                  [ A; B ],
                  "fold",
                  [ Acc; F ]
                |),
                [ M.read (| self |); M.read (| init |); M.read (| f |) ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
            unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> Self::Item
            where
                Self: TrustedRandomAccessNoCoerce,
            {
                // SAFETY: `ZipImpl::__iterator_get_unchecked` has same safety
                // requirements as `Iterator::__iterator_get_unchecked`.
                unsafe { ZipImpl::get_unchecked(self, idx) }
            }
        *)
        Definition __iterator_get_unchecked
            (A B : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self A B in
          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::adapters::zip::ZipImpl",
                  Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ],
                  [ A; B ],
                  "get_unchecked",
                  []
                |),
                [ M.read (| self |); M.read (| idx |) ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::traits::iterator::Iterator"
            (Self A B)
            (* Trait polymorphic types *) []
            (* Instance *)
            [
              ("Item", InstanceField.Ty (_Item A B));
              ("next", InstanceField.Method (next A B));
              ("size_hint", InstanceField.Method (size_hint A B));
              ("nth", InstanceField.Method (nth A B));
              ("fold", InstanceField.Method (fold A B));
              ("__iterator_get_unchecked", InstanceField.Method (__iterator_get_unchecked A B))
            ].
      End Impl_core_iter_traits_iterator_Iterator_where_core_iter_traits_iterator_Iterator_A_where_core_iter_traits_iterator_Iterator_B_for_core_iter_adapters_zip_Zip_A_B.
      
      Module Impl_core_iter_traits_double_ended_DoubleEndedIterator_where_core_iter_traits_double_ended_DoubleEndedIterator_A_where_core_iter_traits_exact_size_ExactSizeIterator_A_where_core_iter_traits_double_ended_DoubleEndedIterator_B_where_core_iter_traits_exact_size_ExactSizeIterator_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        (*
            fn next_back(&mut self) -> Option<(A::Item, B::Item)> {
                ZipImpl::next_back(self)
            }
        *)
        Definition next_back
            (A B : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.call_closure (|
                M.get_trait_method (|
                  "core::iter::adapters::zip::ZipImpl",
                  Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ],
                  [ A; B ],
                  "next_back",
                  []
                |),
                [ M.read (| self |) ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::traits::double_ended::DoubleEndedIterator"
            (Self A B)
            (* Trait polymorphic types *) []
            (* Instance *) [ ("next_back", InstanceField.Method (next_back A B)) ].
      End Impl_core_iter_traits_double_ended_DoubleEndedIterator_where_core_iter_traits_double_ended_DoubleEndedIterator_A_where_core_iter_traits_exact_size_ExactSizeIterator_A_where_core_iter_traits_double_ended_DoubleEndedIterator_B_where_core_iter_traits_exact_size_ExactSizeIterator_B_for_core_iter_adapters_zip_Zip_A_B.
      
      (* Trait *)
      (* Empty module 'ZipImpl' *)
      
      Module Impl_core_iter_adapters_zip_ZipImpl_where_core_iter_traits_iterator_Iterator_A_where_core_iter_traits_iterator_Iterator_B_A_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        (*     type Item = (A::Item, B::Item); *)
        Definition _Item (A B : Ty.t) : Ty.t := Ty.tuple [ Ty.associated; Ty.associated ].
        
        (*
                default fn new(a: A, b: B) -> Self {
                    Zip {
                        a,
                        b,
                        index: 0, // unused
                        len: 0,   // unused
                        a_len: 0, // unused
                    }
                }
        *)
        Definition new (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ a; b ] =>
            ltac:(M.monadic
              (let a := M.alloc (| a |) in
              let b := M.alloc (| b |) in
              Value.StructRecord
                "core::iter::adapters::zip::Zip"
                [
                  ("a", M.read (| a |));
                  ("b", M.read (| b |));
                  ("index", Value.Integer IntegerKind.Usize 0);
                  ("len", Value.Integer IntegerKind.Usize 0);
                  ("a_len", Value.Integer IntegerKind.Usize 0)
                ]))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
                default fn next(&mut self) -> Option<(A::Item, B::Item)> {
                    let x = self.a.next()?;
                    let y = self.b.next()?;
                    Some((x, y))
                }
        *)
        Definition next (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.catch_return (|
                ltac:(M.monadic
                  (M.read (|
                    let~ x :=
                      M.copy (|
                        M.match_operator (|
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::try_trait::Try",
                                Ty.apply (Ty.path "core::option::Option") [] [ Ty.associated ],
                                [],
                                "branch",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::iter::traits::iterator::Iterator",
                                    A,
                                    [],
                                    "next",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "core::iter::adapters::zip::Zip",
                                      "a"
                                    |)
                                  ]
                                |)
                              ]
                            |)
                          |),
                          [
                            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::option::Option")
                                              []
                                              [ Ty.tuple [ Ty.associated; Ty.associated ] ],
                                            [
                                              Ty.apply
                                                (Ty.path "core::option::Option")
                                                []
                                                [ Ty.path "core::convert::Infallible" ]
                                            ],
                                            "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
                    let~ y :=
                      M.copy (|
                        M.match_operator (|
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::try_trait::Try",
                                Ty.apply (Ty.path "core::option::Option") [] [ Ty.associated ],
                                [],
                                "branch",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::iter::traits::iterator::Iterator",
                                    B,
                                    [],
                                    "next",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "core::iter::adapters::zip::Zip",
                                      "b"
                                    |)
                                  ]
                                |)
                              ]
                            |)
                          |),
                          [
                            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::option::Option")
                                              []
                                              [ Ty.tuple [ Ty.associated; Ty.associated ] ],
                                            [
                                              Ty.apply
                                                (Ty.path "core::option::Option")
                                                []
                                                [ Ty.path "core::convert::Infallible" ]
                                            ],
                                            "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.StructTuple
                        "core::option::Option::Some"
                        [ Value.Tuple [ M.read (| x |); M.read (| y |) ] ]
                    |)
                  |)))
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
                default fn nth(&mut self, n: usize) -> Option<Self::Item> {
                    self.super_nth(n)
                }
        *)
        Definition nth (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          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::iter::adapters::zip::Zip") [] [ A; B ],
                  "super_nth",
                  []
                |),
                [ M.read (| self |); M.read (| n |) ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
                default fn next_back(&mut self) -> Option<(A::Item, B::Item)>
                where
                    A: DoubleEndedIterator + ExactSizeIterator,
                    B: DoubleEndedIterator + ExactSizeIterator,
                {
                    // The function body below only uses `self.a/b.len()` and `self.a/b.next_back()`
                    // and doesn’t call `next_back` too often, so this implementation is safe in
                    // the `TrustedRandomAccessNoCoerce` specialization
        
                    let a_sz = self.a.len();
                    let b_sz = self.b.len();
                    if a_sz != b_sz {
                        // Adjust a, b to equal length
                        if a_sz > b_sz {
                            for _ in 0..a_sz - b_sz {
                                self.a.next_back();
                            }
                        } else {
                            for _ in 0..b_sz - a_sz {
                                self.b.next_back();
                            }
                        }
                    }
                    match (self.a.next_back(), self.b.next_back()) {
                        (Some(x), Some(y)) => Some((x, y)),
                        (None, None) => None,
                        _ => unreachable!(),
                    }
                }
        *)
        Definition next_back
            (A B : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.read (|
                let~ a_sz :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::iter::traits::exact_size::ExactSizeIterator",
                        A,
                        [],
                        "len",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::zip::Zip",
                          "a"
                        |)
                      ]
                    |)
                  |) in
                let~ b_sz :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::iter::traits::exact_size::ExactSizeIterator",
                        B,
                        [],
                        "len",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::zip::Zip",
                          "b"
                        |)
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (| BinOp.ne (| M.read (| a_sz |), M.read (| b_sz |) |) |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.use
                                      (M.alloc (|
                                        BinOp.gt (| M.read (| a_sz |), M.read (| b_sz |) |)
                                      |)) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ |),
                                      Value.Bool true
                                    |) in
                                  M.use
                                    (M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::iter::traits::collect::IntoIterator",
                                            Ty.apply
                                              (Ty.path "core::ops::range::Range")
                                              []
                                              [ Ty.path "usize" ],
                                            [],
                                            "into_iter",
                                            []
                                          |),
                                          [
                                            Value.StructRecord
                                              "core::ops::range::Range"
                                              [
                                                ("start", Value.Integer IntegerKind.Usize 0);
                                                ("end_",
                                                  BinOp.Wrap.sub (|
                                                    M.read (| a_sz |),
                                                    M.read (| b_sz |)
                                                  |))
                                              ]
                                          ]
                                        |)
                                      |),
                                      [
                                        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::ops::range::Range")
                                                            []
                                                            [ Ty.path "usize" ],
                                                          [],
                                                          "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~ _ :=
                                                            M.alloc (|
                                                              M.call_closure (|
                                                                M.get_trait_method (|
                                                                  "core::iter::traits::double_ended::DoubleEndedIterator",
                                                                  A,
                                                                  [],
                                                                  "next_back",
                                                                  []
                                                                |),
                                                                [
                                                                  M.SubPointer.get_struct_record_field (|
                                                                    M.read (| self |),
                                                                    "core::iter::adapters::zip::Zip",
                                                                    "a"
                                                                  |)
                                                                ]
                                                              |)
                                                            |) in
                                                          M.alloc (| Value.Tuple [] |)))
                                                    ]
                                                  |) in
                                                M.alloc (| Value.Tuple [] |)))
                                            |)))
                                      ]
                                    |))));
                              fun γ =>
                                ltac:(M.monadic
                                  (M.use
                                    (M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::iter::traits::collect::IntoIterator",
                                            Ty.apply
                                              (Ty.path "core::ops::range::Range")
                                              []
                                              [ Ty.path "usize" ],
                                            [],
                                            "into_iter",
                                            []
                                          |),
                                          [
                                            Value.StructRecord
                                              "core::ops::range::Range"
                                              [
                                                ("start", Value.Integer IntegerKind.Usize 0);
                                                ("end_",
                                                  BinOp.Wrap.sub (|
                                                    M.read (| b_sz |),
                                                    M.read (| a_sz |)
                                                  |))
                                              ]
                                          ]
                                        |)
                                      |),
                                      [
                                        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::ops::range::Range")
                                                            []
                                                            [ Ty.path "usize" ],
                                                          [],
                                                          "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~ _ :=
                                                            M.alloc (|
                                                              M.call_closure (|
                                                                M.get_trait_method (|
                                                                  "core::iter::traits::double_ended::DoubleEndedIterator",
                                                                  B,
                                                                  [],
                                                                  "next_back",
                                                                  []
                                                                |),
                                                                [
                                                                  M.SubPointer.get_struct_record_field (|
                                                                    M.read (| self |),
                                                                    "core::iter::adapters::zip::Zip",
                                                                    "b"
                                                                  |)
                                                                ]
                                                              |)
                                                            |) in
                                                          M.alloc (| Value.Tuple [] |)))
                                                    ]
                                                  |) in
                                                M.alloc (| Value.Tuple [] |)))
                                            |)))
                                      ]
                                    |))))
                            ]
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                M.match_operator (|
                  M.alloc (|
                    Value.Tuple
                      [
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::iter::traits::double_ended::DoubleEndedIterator",
                            A,
                            [],
                            "next_back",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::zip::Zip",
                              "a"
                            |)
                          ]
                        |);
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::iter::traits::double_ended::DoubleEndedIterator",
                            B,
                            [],
                            "next_back",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::zip::Zip",
                              "b"
                            |)
                          ]
                        |)
                      ]
                  |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                        let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                        let γ1_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ0_0,
                            "core::option::Option::Some",
                            0
                          |) in
                        let x := M.copy (| γ1_0 |) in
                        let γ1_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ0_1,
                            "core::option::Option::Some",
                            0
                          |) in
                        let y := M.copy (| γ1_0 |) in
                        M.alloc (|
                          Value.StructTuple
                            "core::option::Option::Some"
                            [ Value.Tuple [ M.read (| x |); M.read (| y |) ] ]
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                        let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                        let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in
                        let _ := M.is_struct_tuple (| γ0_1, "core::option::Option::None" |) in
                        M.alloc (| Value.StructTuple "core::option::Option::None" [] |)));
                    fun γ =>
                      ltac:(M.monadic
                        (M.alloc (|
                          M.never_to_any (|
                            M.call_closure (|
                              M.get_function (| "core::panicking::panic", [] |),
                              [ M.read (| Value.String "internal error: entered unreachable code" |)
                              ]
                            |)
                          |)
                        |)))
                  ]
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
            default fn size_hint(&self) -> (usize, Option<usize>) {
                let (a_lower, a_upper) = self.a.size_hint();
                let (b_lower, b_upper) = self.b.size_hint();
        
                let lower = cmp::min(a_lower, b_lower);
        
                let upper = match (a_upper, b_upper) {
                    (Some(x), Some(y)) => Some(cmp::min(x, y)),
                    (Some(x), None) => Some(x),
                    (None, Some(y)) => Some(y),
                    (None, None) => None,
                };
        
                (lower, upper)
            }
        *)
        Definition size_hint
            (A B : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.read (|
                M.match_operator (|
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::iter::traits::iterator::Iterator",
                        A,
                        [],
                        "size_hint",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::zip::Zip",
                          "a"
                        |)
                      ]
                    |)
                  |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                        let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                        let a_lower := M.copy (| γ0_0 |) in
                        let a_upper := M.copy (| γ0_1 |) in
                        M.match_operator (|
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::iter::traits::iterator::Iterator",
                                B,
                                [],
                                "size_hint",
                                []
                              |),
                              [
                                M.SubPointer.get_struct_record_field (|
                                  M.read (| self |),
                                  "core::iter::adapters::zip::Zip",
                                  "b"
                                |)
                              ]
                            |)
                          |),
                          [
                            fun γ =>
                              ltac:(M.monadic
                                (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                                let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                                let b_lower := M.copy (| γ0_0 |) in
                                let b_upper := M.copy (| γ0_1 |) in
                                let~ lower :=
                                  M.alloc (|
                                    M.call_closure (|
                                      M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |),
                                      [ M.read (| a_lower |); M.read (| b_lower |) ]
                                    |)
                                  |) in
                                let~ upper :=
                                  M.copy (|
                                    M.match_operator (|
                                      M.alloc (|
                                        Value.Tuple [ M.read (| a_upper |); M.read (| b_upper |) ]
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                                            let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                                            let γ1_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ0_0,
                                                "core::option::Option::Some",
                                                0
                                              |) in
                                            let x := M.copy (| γ1_0 |) in
                                            let γ1_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ0_1,
                                                "core::option::Option::Some",
                                                0
                                              |) in
                                            let y := M.copy (| γ1_0 |) in
                                            M.alloc (|
                                              Value.StructTuple
                                                "core::option::Option::Some"
                                                [
                                                  M.call_closure (|
                                                    M.get_function (|
                                                      "core::cmp::min",
                                                      [ Ty.path "usize" ]
                                                    |),
                                                    [ M.read (| x |); M.read (| y |) ]
                                                  |)
                                                ]
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                                            let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                                            let γ1_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ0_0,
                                                "core::option::Option::Some",
                                                0
                                              |) in
                                            let x := M.copy (| γ1_0 |) in
                                            let _ :=
                                              M.is_struct_tuple (|
                                                γ0_1,
                                                "core::option::Option::None"
                                              |) in
                                            M.alloc (|
                                              Value.StructTuple
                                                "core::option::Option::Some"
                                                [ M.read (| x |) ]
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                                            let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                                            let _ :=
                                              M.is_struct_tuple (|
                                                γ0_0,
                                                "core::option::Option::None"
                                              |) in
                                            let γ1_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ0_1,
                                                "core::option::Option::Some",
                                                0
                                              |) in
                                            let y := M.copy (| γ1_0 |) in
                                            M.alloc (|
                                              Value.StructTuple
                                                "core::option::Option::Some"
                                                [ M.read (| y |) ]
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                                            let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                                            let _ :=
                                              M.is_struct_tuple (|
                                                γ0_0,
                                                "core::option::Option::None"
                                              |) in
                                            let _ :=
                                              M.is_struct_tuple (|
                                                γ0_1,
                                                "core::option::Option::None"
                                              |) in
                                            M.alloc (|
                                              Value.StructTuple "core::option::Option::None" []
                                            |)))
                                      ]
                                    |)
                                  |) in
                                M.alloc (|
                                  Value.Tuple [ M.read (| lower |); M.read (| upper |) ]
                                |)))
                          ]
                        |)))
                  ]
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
            default unsafe fn get_unchecked(&mut self, _idx: usize) -> <Self as Iterator>::Item
            where
                Self: TrustedRandomAccessNoCoerce,
            {
                unreachable!("Always specialized");
            }
        *)
        Definition get_unchecked
            (A B : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self; _idx ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              let _idx := M.alloc (| _idx |) in
              M.never_to_any (|
                M.call_closure (|
                  M.get_function (| "core::panicking::panic_fmt", [] |),
                  [
                    M.call_closure (|
                      M.get_associated_function (| Ty.path "core::fmt::Arguments", "new_v1", [] |),
                      [
                        M.alloc (|
                          Value.Array
                            [
                              M.read (|
                                Value.String
                                  "internal error: entered unreachable code: Always specialized"
                              |)
                            ]
                        |);
                        M.alloc (|
                          M.call_closure (|
                            M.get_associated_function (|
                              Ty.path "core::fmt::rt::Argument",
                              "none",
                              []
                            |),
                            []
                          |)
                        |)
                      ]
                    |)
                  ]
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
            default fn fold<Acc, F>(self, init: Acc, f: F) -> Acc
            where
                F: FnMut(Acc, Self::Item) -> Acc,
            {
                SpecFold::spec_fold(self, init, f)
            }
        *)
        Definition fold (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [ Acc; F ], [ self; init; f ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              let init := M.alloc (| init |) in
              let f := M.alloc (| f |) in
              M.call_closure (|
                M.get_trait_method (|
                  "core::iter::adapters::zip::SpecFold",
                  Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ],
                  [],
                  "spec_fold",
                  [ Acc; F ]
                |),
                [ M.read (| self |); M.read (| init |); M.read (| f |) ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::adapters::zip::ZipImpl"
            (Self A B)
            (* Trait polymorphic types *) [ (* A *) A; (* B *) B ]
            (* Instance *)
            [
              ("Item", InstanceField.Ty (_Item A B));
              ("new", InstanceField.Method (new A B));
              ("next", InstanceField.Method (next A B));
              ("nth", InstanceField.Method (nth A B));
              ("next_back", InstanceField.Method (next_back A B));
              ("size_hint", InstanceField.Method (size_hint A B));
              ("get_unchecked", InstanceField.Method (get_unchecked A B));
              ("fold", InstanceField.Method (fold A B))
            ].
      End Impl_core_iter_adapters_zip_ZipImpl_where_core_iter_traits_iterator_Iterator_A_where_core_iter_traits_iterator_Iterator_B_A_B_for_core_iter_adapters_zip_Zip_A_B.
      
      Module Impl_core_iter_adapters_zip_ZipImpl_where_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_A_where_core_iter_traits_iterator_Iterator_A_where_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_B_where_core_iter_traits_iterator_Iterator_B_A_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        (*
                default fn new(a: A, b: B) -> Self {
                    Zip {
                        a,
                        b,
                        index: 0, // unused
                        len: 0,   // unused
                        a_len: 0, // unused
                    }
                }
        *)
        Definition new (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ a; b ] =>
            ltac:(M.monadic
              (let a := M.alloc (| a |) in
              let b := M.alloc (| b |) in
              Value.StructRecord
                "core::iter::adapters::zip::Zip"
                [
                  ("a", M.read (| a |));
                  ("b", M.read (| b |));
                  ("index", Value.Integer IntegerKind.Usize 0);
                  ("len", Value.Integer IntegerKind.Usize 0);
                  ("a_len", Value.Integer IntegerKind.Usize 0)
                ]))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
                default fn next(&mut self) -> Option<(A::Item, B::Item)> {
                    let x = self.a.next()?;
                    let y = self.b.next()?;
                    Some((x, y))
                }
        *)
        Definition next (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.catch_return (|
                ltac:(M.monadic
                  (M.read (|
                    let~ x :=
                      M.copy (|
                        M.match_operator (|
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::try_trait::Try",
                                Ty.apply (Ty.path "core::option::Option") [] [ Ty.associated ],
                                [],
                                "branch",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::iter::traits::iterator::Iterator",
                                    A,
                                    [],
                                    "next",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "core::iter::adapters::zip::Zip",
                                      "a"
                                    |)
                                  ]
                                |)
                              ]
                            |)
                          |),
                          [
                            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::option::Option")
                                              []
                                              [ Ty.tuple [ Ty.associated; Ty.associated ] ],
                                            [
                                              Ty.apply
                                                (Ty.path "core::option::Option")
                                                []
                                                [ Ty.path "core::convert::Infallible" ]
                                            ],
                                            "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
                    let~ y :=
                      M.copy (|
                        M.match_operator (|
                          M.alloc (|
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::ops::try_trait::Try",
                                Ty.apply (Ty.path "core::option::Option") [] [ Ty.associated ],
                                [],
                                "branch",
                                []
                              |),
                              [
                                M.call_closure (|
                                  M.get_trait_method (|
                                    "core::iter::traits::iterator::Iterator",
                                    B,
                                    [],
                                    "next",
                                    []
                                  |),
                                  [
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "core::iter::adapters::zip::Zip",
                                      "b"
                                    |)
                                  ]
                                |)
                              ]
                            |)
                          |),
                          [
                            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::option::Option")
                                              []
                                              [ Ty.tuple [ Ty.associated; Ty.associated ] ],
                                            [
                                              Ty.apply
                                                (Ty.path "core::option::Option")
                                                []
                                                [ Ty.path "core::convert::Infallible" ]
                                            ],
                                            "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.StructTuple
                        "core::option::Option::Some"
                        [ Value.Tuple [ M.read (| x |); M.read (| y |) ] ]
                    |)
                  |)))
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
                default fn nth(&mut self, n: usize) -> Option<Self::Item> {
                    self.super_nth(n)
                }
        *)
        Definition nth (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          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::iter::adapters::zip::Zip") [] [ A; B ],
                  "super_nth",
                  []
                |),
                [ M.read (| self |); M.read (| n |) ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
                default fn next_back(&mut self) -> Option<(A::Item, B::Item)>
                where
                    A: DoubleEndedIterator + ExactSizeIterator,
                    B: DoubleEndedIterator + ExactSizeIterator,
                {
                    // The function body below only uses `self.a/b.len()` and `self.a/b.next_back()`
                    // and doesn’t call `next_back` too often, so this implementation is safe in
                    // the `TrustedRandomAccessNoCoerce` specialization
        
                    let a_sz = self.a.len();
                    let b_sz = self.b.len();
                    if a_sz != b_sz {
                        // Adjust a, b to equal length
                        if a_sz > b_sz {
                            for _ in 0..a_sz - b_sz {
                                self.a.next_back();
                            }
                        } else {
                            for _ in 0..b_sz - a_sz {
                                self.b.next_back();
                            }
                        }
                    }
                    match (self.a.next_back(), self.b.next_back()) {
                        (Some(x), Some(y)) => Some((x, y)),
                        (None, None) => None,
                        _ => unreachable!(),
                    }
                }
        *)
        Definition next_back
            (A B : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.read (|
                let~ a_sz :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::iter::traits::exact_size::ExactSizeIterator",
                        A,
                        [],
                        "len",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::zip::Zip",
                          "a"
                        |)
                      ]
                    |)
                  |) in
                let~ b_sz :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::iter::traits::exact_size::ExactSizeIterator",
                        B,
                        [],
                        "len",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::zip::Zip",
                          "b"
                        |)
                      ]
                    |)
                  |) in
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (| BinOp.ne (| M.read (| a_sz |), M.read (| b_sz |) |) |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.use
                                      (M.alloc (|
                                        BinOp.gt (| M.read (| a_sz |), M.read (| b_sz |) |)
                                      |)) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ |),
                                      Value.Bool true
                                    |) in
                                  M.use
                                    (M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::iter::traits::collect::IntoIterator",
                                            Ty.apply
                                              (Ty.path "core::ops::range::Range")
                                              []
                                              [ Ty.path "usize" ],
                                            [],
                                            "into_iter",
                                            []
                                          |),
                                          [
                                            Value.StructRecord
                                              "core::ops::range::Range"
                                              [
                                                ("start", Value.Integer IntegerKind.Usize 0);
                                                ("end_",
                                                  BinOp.Wrap.sub (|
                                                    M.read (| a_sz |),
                                                    M.read (| b_sz |)
                                                  |))
                                              ]
                                          ]
                                        |)
                                      |),
                                      [
                                        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::ops::range::Range")
                                                            []
                                                            [ Ty.path "usize" ],
                                                          [],
                                                          "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~ _ :=
                                                            M.alloc (|
                                                              M.call_closure (|
                                                                M.get_trait_method (|
                                                                  "core::iter::traits::double_ended::DoubleEndedIterator",
                                                                  A,
                                                                  [],
                                                                  "next_back",
                                                                  []
                                                                |),
                                                                [
                                                                  M.SubPointer.get_struct_record_field (|
                                                                    M.read (| self |),
                                                                    "core::iter::adapters::zip::Zip",
                                                                    "a"
                                                                  |)
                                                                ]
                                                              |)
                                                            |) in
                                                          M.alloc (| Value.Tuple [] |)))
                                                    ]
                                                  |) in
                                                M.alloc (| Value.Tuple [] |)))
                                            |)))
                                      ]
                                    |))));
                              fun γ =>
                                ltac:(M.monadic
                                  (M.use
                                    (M.match_operator (|
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::iter::traits::collect::IntoIterator",
                                            Ty.apply
                                              (Ty.path "core::ops::range::Range")
                                              []
                                              [ Ty.path "usize" ],
                                            [],
                                            "into_iter",
                                            []
                                          |),
                                          [
                                            Value.StructRecord
                                              "core::ops::range::Range"
                                              [
                                                ("start", Value.Integer IntegerKind.Usize 0);
                                                ("end_",
                                                  BinOp.Wrap.sub (|
                                                    M.read (| b_sz |),
                                                    M.read (| a_sz |)
                                                  |))
                                              ]
                                          ]
                                        |)
                                      |),
                                      [
                                        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::ops::range::Range")
                                                            []
                                                            [ Ty.path "usize" ],
                                                          [],
                                                          "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~ _ :=
                                                            M.alloc (|
                                                              M.call_closure (|
                                                                M.get_trait_method (|
                                                                  "core::iter::traits::double_ended::DoubleEndedIterator",
                                                                  B,
                                                                  [],
                                                                  "next_back",
                                                                  []
                                                                |),
                                                                [
                                                                  M.SubPointer.get_struct_record_field (|
                                                                    M.read (| self |),
                                                                    "core::iter::adapters::zip::Zip",
                                                                    "b"
                                                                  |)
                                                                ]
                                                              |)
                                                            |) in
                                                          M.alloc (| Value.Tuple [] |)))
                                                    ]
                                                  |) in
                                                M.alloc (| Value.Tuple [] |)))
                                            |)))
                                      ]
                                    |))))
                            ]
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                M.match_operator (|
                  M.alloc (|
                    Value.Tuple
                      [
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::iter::traits::double_ended::DoubleEndedIterator",
                            A,
                            [],
                            "next_back",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::zip::Zip",
                              "a"
                            |)
                          ]
                        |);
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::iter::traits::double_ended::DoubleEndedIterator",
                            B,
                            [],
                            "next_back",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::zip::Zip",
                              "b"
                            |)
                          ]
                        |)
                      ]
                  |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                        let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                        let γ1_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ0_0,
                            "core::option::Option::Some",
                            0
                          |) in
                        let x := M.copy (| γ1_0 |) in
                        let γ1_0 :=
                          M.SubPointer.get_struct_tuple_field (|
                            γ0_1,
                            "core::option::Option::Some",
                            0
                          |) in
                        let y := M.copy (| γ1_0 |) in
                        M.alloc (|
                          Value.StructTuple
                            "core::option::Option::Some"
                            [ Value.Tuple [ M.read (| x |); M.read (| y |) ] ]
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                        let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                        let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in
                        let _ := M.is_struct_tuple (| γ0_1, "core::option::Option::None" |) in
                        M.alloc (| Value.StructTuple "core::option::Option::None" [] |)));
                    fun γ =>
                      ltac:(M.monadic
                        (M.alloc (|
                          M.never_to_any (|
                            M.call_closure (|
                              M.get_function (| "core::panicking::panic", [] |),
                              [ M.read (| Value.String "internal error: entered unreachable code" |)
                              ]
                            |)
                          |)
                        |)))
                  ]
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
            default fn size_hint(&self) -> (usize, Option<usize>) {
                let size = cmp::min(self.a.size(), self.b.size());
                (size, Some(size))
            }
        *)
        Definition size_hint
            (A B : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.read (|
                let~ size :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |),
                      [
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::iter::adapters::zip::TrustedRandomAccessNoCoerce",
                            A,
                            [],
                            "size",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::zip::Zip",
                              "a"
                            |)
                          ]
                        |);
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::iter::adapters::zip::TrustedRandomAccessNoCoerce",
                            B,
                            [],
                            "size",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::zip::Zip",
                              "b"
                            |)
                          ]
                        |)
                      ]
                    |)
                  |) in
                M.alloc (|
                  Value.Tuple
                    [
                      M.read (| size |);
                      Value.StructTuple "core::option::Option::Some" [ M.read (| size |) ]
                    ]
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
            unsafe fn get_unchecked(&mut self, idx: usize) -> <Self as Iterator>::Item {
                let idx = self.index + idx;
                // SAFETY: the caller must uphold the contract for
                // `Iterator::__iterator_get_unchecked`.
                unsafe { (self.a.__iterator_get_unchecked(idx), self.b.__iterator_get_unchecked(idx)) }
            }
        *)
        Definition get_unchecked
            (A B : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self; idx ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              let idx := M.alloc (| idx |) in
              M.read (|
                let~ idx :=
                  M.alloc (|
                    BinOp.Wrap.add (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::zip::Zip",
                          "index"
                        |)
                      |),
                      M.read (| idx |)
                    |)
                  |) in
                M.alloc (|
                  Value.Tuple
                    [
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::iter::traits::iterator::Iterator",
                          A,
                          [],
                          "__iterator_get_unchecked",
                          []
                        |),
                        [
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "core::iter::adapters::zip::Zip",
                            "a"
                          |);
                          M.read (| idx |)
                        ]
                      |);
                      M.call_closure (|
                        M.get_trait_method (|
                          "core::iter::traits::iterator::Iterator",
                          B,
                          [],
                          "__iterator_get_unchecked",
                          []
                        |),
                        [
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "core::iter::adapters::zip::Zip",
                            "b"
                          |);
                          M.read (| idx |)
                        ]
                      |)
                    ]
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
            fn fold<Acc, F>(mut self, init: Acc, mut f: F) -> Acc
            where
                F: FnMut(Acc, Self::Item) -> Acc,
            {
                let mut accum = init;
                let len = ZipImpl::size_hint(&self).0;
                for i in 0..len {
                    // SAFETY: since Self: TrustedRandomAccessNoCoerce we can trust the size-hint to
                    // calculate the length and then use that to do unchecked iteration.
                    // fold consumes the iterator so we don't need to fixup any state.
                    unsafe {
                        accum = f(accum, self.get_unchecked(i));
                    }
                }
                accum
            }
        *)
        Definition fold (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [ Acc; F ], [ self; init; f ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              let init := M.alloc (| init |) in
              let f := M.alloc (| f |) in
              M.read (|
                let~ accum := M.copy (| init |) in
                let~ len :=
                  M.copy (|
                    M.SubPointer.get_tuple_field (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::iter::adapters::zip::ZipImpl",
                            Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ],
                            [ A; B ],
                            "size_hint",
                            []
                          |),
                          [ self ]
                        |)
                      |),
                      0
                    |)
                  |) in
                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::ops::range::Range") [] [ Ty.path "usize" ],
                            [],
                            "into_iter",
                            []
                          |),
                          [
                            Value.StructRecord
                              "core::ops::range::Range"
                              [
                                ("start", Value.Integer IntegerKind.Usize 0);
                                ("end_", M.read (| len |))
                              ]
                          ]
                        |)
                      |),
                      [
                        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::ops::range::Range")
                                            []
                                            [ Ty.path "usize" ],
                                          [],
                                          "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 i := M.copy (| γ0_0 |) in
                                          let~ _ :=
                                            M.write (|
                                              accum,
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::function::FnMut",
                                                  F,
                                                  [
                                                    Ty.tuple
                                                      [
                                                        Acc;
                                                        Ty.tuple [ Ty.associated; Ty.associated ]
                                                      ]
                                                  ],
                                                  "call_mut",
                                                  []
                                                |),
                                                [
                                                  f;
                                                  Value.Tuple
                                                    [
                                                      M.read (| accum |);
                                                      M.call_closure (|
                                                        M.get_trait_method (|
                                                          "core::iter::adapters::zip::ZipImpl",
                                                          Ty.apply
                                                            (Ty.path
                                                              "core::iter::adapters::zip::Zip")
                                                            []
                                                            [ A; B ],
                                                          [ A; B ],
                                                          "get_unchecked",
                                                          []
                                                        |),
                                                        [ self; M.read (| i |) ]
                                                      |)
                                                    ]
                                                ]
                                              |)
                                            |) in
                                          M.alloc (| Value.Tuple [] |)))
                                    ]
                                  |) in
                                M.alloc (| Value.Tuple [] |)))
                            |)))
                      ]
                    |)) in
                accum
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::adapters::zip::ZipImpl"
            (Self A B)
            (* Trait polymorphic types *) [ (* A *) A; (* B *) B ]
            (* Instance *)
            [
              ("new", InstanceField.Method (new A B));
              ("next", InstanceField.Method (next A B));
              ("nth", InstanceField.Method (nth A B));
              ("next_back", InstanceField.Method (next_back A B));
              ("size_hint", InstanceField.Method (size_hint A B));
              ("get_unchecked", InstanceField.Method (get_unchecked A B));
              ("fold", InstanceField.Method (fold A B))
            ].
      End Impl_core_iter_adapters_zip_ZipImpl_where_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_A_where_core_iter_traits_iterator_Iterator_A_where_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_B_where_core_iter_traits_iterator_Iterator_B_A_B_for_core_iter_adapters_zip_Zip_A_B.
      
      Module Impl_core_iter_adapters_zip_ZipImpl_where_core_iter_adapters_zip_TrustedRandomAccess_A_where_core_iter_traits_iterator_Iterator_A_where_core_iter_adapters_zip_TrustedRandomAccess_B_where_core_iter_traits_iterator_Iterator_B_A_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        (*
            fn new(a: A, b: B) -> Self {
                let a_len = a.size();
                let len = cmp::min(a_len, b.size());
                Zip { a, b, index: 0, len, a_len }
            }
        *)
        Definition new (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ a; b ] =>
            ltac:(M.monadic
              (let a := M.alloc (| a |) in
              let b := M.alloc (| b |) in
              M.read (|
                let~ a_len :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::iter::adapters::zip::TrustedRandomAccessNoCoerce",
                        A,
                        [],
                        "size",
                        []
                      |),
                      [ a ]
                    |)
                  |) in
                let~ len :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |),
                      [
                        M.read (| a_len |);
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::iter::adapters::zip::TrustedRandomAccessNoCoerce",
                            B,
                            [],
                            "size",
                            []
                          |),
                          [ b ]
                        |)
                      ]
                    |)
                  |) in
                M.alloc (|
                  Value.StructRecord
                    "core::iter::adapters::zip::Zip"
                    [
                      ("a", M.read (| a |));
                      ("b", M.read (| b |));
                      ("index", Value.Integer IntegerKind.Usize 0);
                      ("len", M.read (| len |));
                      ("a_len", M.read (| a_len |))
                    ]
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
            fn next(&mut self) -> Option<(A::Item, B::Item)> {
                if self.index < self.len {
                    let i = self.index;
                    // since get_unchecked executes code which can panic we increment the counters beforehand
                    // so that the same index won't be accessed twice, as required by TrustedRandomAccess
                    self.index += 1;
                    // SAFETY: `i` is smaller than `self.len`, thus smaller than `self.a.len()` and `self.b.len()`
                    unsafe {
                        Some((self.a.__iterator_get_unchecked(i), self.b.__iterator_get_unchecked(i)))
                    }
                } else if A::MAY_HAVE_SIDE_EFFECT && self.index < self.a_len {
                    let i = self.index;
                    // as above, increment before executing code that may panic
                    self.index += 1;
                    self.len += 1;
                    // match the base implementation's potential side effects
                    // SAFETY: we just checked that `i` < `self.a.len()`
                    unsafe {
                        self.a.__iterator_get_unchecked(i);
                    }
                    None
                } else {
                    None
                }
            }
        *)
        Definition next (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.read (|
                M.match_operator (|
                  M.alloc (| Value.Tuple [] |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ :=
                          M.use
                            (M.alloc (|
                              BinOp.lt (|
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| self |),
                                    "core::iter::adapters::zip::Zip",
                                    "index"
                                  |)
                                |),
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| self |),
                                    "core::iter::adapters::zip::Zip",
                                    "len"
                                  |)
                                |)
                              |)
                            |)) in
                        let _ :=
                          M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                        let~ i :=
                          M.copy (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::zip::Zip",
                              "index"
                            |)
                          |) in
                        let~ _ :=
                          let β :=
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::zip::Zip",
                              "index"
                            |) in
                          M.write (|
                            β,
                            BinOp.Wrap.add (| M.read (| β |), Value.Integer IntegerKind.Usize 1 |)
                          |) in
                        M.alloc (|
                          Value.StructTuple
                            "core::option::Option::Some"
                            [
                              Value.Tuple
                                [
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::iter::traits::iterator::Iterator",
                                      A,
                                      [],
                                      "__iterator_get_unchecked",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| self |),
                                        "core::iter::adapters::zip::Zip",
                                        "a"
                                      |);
                                      M.read (| i |)
                                    ]
                                  |);
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::iter::traits::iterator::Iterator",
                                      B,
                                      [],
                                      "__iterator_get_unchecked",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| self |),
                                        "core::iter::adapters::zip::Zip",
                                        "b"
                                      |);
                                      M.read (| i |)
                                    ]
                                  |)
                                ]
                            ]
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (M.match_operator (|
                          M.alloc (| Value.Tuple [] |),
                          [
                            fun γ =>
                              ltac:(M.monadic
                                (let γ :=
                                  M.use
                                    (M.alloc (|
                                      LogicalOp.and (|
                                        M.read (|
                                          M.get_constant (|
                                            "core::iter::adapters::zip::TrustedRandomAccessNoCoerce::MAY_HAVE_SIDE_EFFECT"
                                          |)
                                        |),
                                        ltac:(M.monadic
                                          (BinOp.lt (|
                                            M.read (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| self |),
                                                "core::iter::adapters::zip::Zip",
                                                "index"
                                              |)
                                            |),
                                            M.read (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| self |),
                                                "core::iter::adapters::zip::Zip",
                                                "a_len"
                                              |)
                                            |)
                                          |)))
                                      |)
                                    |)) in
                                let _ :=
                                  M.is_constant_or_break_match (|
                                    M.read (| γ |),
                                    Value.Bool true
                                  |) in
                                let~ i :=
                                  M.copy (|
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "core::iter::adapters::zip::Zip",
                                      "index"
                                    |)
                                  |) in
                                let~ _ :=
                                  let β :=
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "core::iter::adapters::zip::Zip",
                                      "index"
                                    |) in
                                  M.write (|
                                    β,
                                    BinOp.Wrap.add (|
                                      M.read (| β |),
                                      Value.Integer IntegerKind.Usize 1
                                    |)
                                  |) in
                                let~ _ :=
                                  let β :=
                                    M.SubPointer.get_struct_record_field (|
                                      M.read (| self |),
                                      "core::iter::adapters::zip::Zip",
                                      "len"
                                    |) in
                                  M.write (|
                                    β,
                                    BinOp.Wrap.add (|
                                      M.read (| β |),
                                      Value.Integer IntegerKind.Usize 1
                                    |)
                                  |) in
                                let~ _ :=
                                  let~ _ :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::iter::traits::iterator::Iterator",
                                          A,
                                          [],
                                          "__iterator_get_unchecked",
                                          []
                                        |),
                                        [
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| self |),
                                            "core::iter::adapters::zip::Zip",
                                            "a"
                                          |);
                                          M.read (| i |)
                                        ]
                                      |)
                                    |) in
                                  M.alloc (| Value.Tuple [] |) in
                                M.alloc (| Value.StructTuple "core::option::Option::None" [] |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.alloc (| Value.StructTuple "core::option::Option::None" [] |)))
                          ]
                        |)))
                  ]
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
            fn size_hint(&self) -> (usize, Option<usize>) {
                let len = self.len - self.index;
                (len, Some(len))
            }
        *)
        Definition size_hint
            (A B : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.read (|
                let~ len :=
                  M.alloc (|
                    BinOp.Wrap.sub (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::zip::Zip",
                          "len"
                        |)
                      |),
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::zip::Zip",
                          "index"
                        |)
                      |)
                    |)
                  |) in
                M.alloc (|
                  Value.Tuple
                    [
                      M.read (| len |);
                      Value.StructTuple "core::option::Option::Some" [ M.read (| len |) ]
                    ]
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
            fn nth(&mut self, n: usize) -> Option<Self::Item> {
                let delta = cmp::min(n, self.len - self.index);
                let end = self.index + delta;
                while self.index < end {
                    let i = self.index;
                    // since get_unchecked executes code which can panic we increment the counters beforehand
                    // so that the same index won't be accessed twice, as required by TrustedRandomAccess
                    self.index += 1;
                    if A::MAY_HAVE_SIDE_EFFECT {
                        // SAFETY: the usage of `cmp::min` to calculate `delta`
                        // ensures that `end` is smaller than or equal to `self.len`,
                        // so `i` is also smaller than `self.len`.
                        unsafe {
                            self.a.__iterator_get_unchecked(i);
                        }
                    }
                    if B::MAY_HAVE_SIDE_EFFECT {
                        // SAFETY: same as above.
                        unsafe {
                            self.b.__iterator_get_unchecked(i);
                        }
                    }
                }
        
                self.super_nth(n - delta)
            }
        *)
        Definition nth (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self; n ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              let n := M.alloc (| n |) in
              M.read (|
                let~ delta :=
                  M.alloc (|
                    M.call_closure (|
                      M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |),
                      [
                        M.read (| n |);
                        BinOp.Wrap.sub (|
                          M.read (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::zip::Zip",
                              "len"
                            |)
                          |),
                          M.read (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::zip::Zip",
                              "index"
                            |)
                          |)
                        |)
                      ]
                    |)
                  |) in
                let~ end_ :=
                  M.alloc (|
                    BinOp.Wrap.add (|
                      M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "core::iter::adapters::zip::Zip",
                          "index"
                        |)
                      |),
                      M.read (| delta |)
                    |)
                  |) in
                let~ _ :=
                  M.loop (|
                    ltac:(M.monadic
                      (M.match_operator (|
                        M.alloc (| Value.Tuple [] |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ :=
                                M.use
                                  (M.alloc (|
                                    BinOp.lt (|
                                      M.read (|
                                        M.SubPointer.get_struct_record_field (|
                                          M.read (| self |),
                                          "core::iter::adapters::zip::Zip",
                                          "index"
                                        |)
                                      |),
                                      M.read (| end_ |)
                                    |)
                                  |)) in
                              let _ :=
                                M.is_constant_or_break_match (|
                                  M.read (| γ |),
                                  Value.Bool true
                                |) in
                              let~ i :=
                                M.copy (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| self |),
                                    "core::iter::adapters::zip::Zip",
                                    "index"
                                  |)
                                |) in
                              let~ _ :=
                                let β :=
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| self |),
                                    "core::iter::adapters::zip::Zip",
                                    "index"
                                  |) in
                                M.write (|
                                  β,
                                  BinOp.Wrap.add (|
                                    M.read (| β |),
                                    Value.Integer IntegerKind.Usize 1
                                  |)
                                |) in
                              let~ _ :=
                                M.match_operator (|
                                  M.alloc (| Value.Tuple [] |),
                                  [
                                    fun γ =>
                                      ltac:(M.monadic
                                        (let γ :=
                                          M.use
                                            (M.get_constant (|
                                              "core::iter::adapters::zip::TrustedRandomAccessNoCoerce::MAY_HAVE_SIDE_EFFECT"
                                            |)) 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::iterator::Iterator",
                                                A,
                                                [],
                                                "__iterator_get_unchecked",
                                                []
                                              |),
                                              [
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| self |),
                                                  "core::iter::adapters::zip::Zip",
                                                  "a"
                                                |);
                                                M.read (| i |)
                                              ]
                                            |)
                                          |) in
                                        M.alloc (| Value.Tuple [] |)));
                                    fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                  ]
                                |) in
                              M.match_operator (|
                                M.alloc (| Value.Tuple [] |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ :=
                                        M.use
                                          (M.get_constant (|
                                            "core::iter::adapters::zip::TrustedRandomAccessNoCoerce::MAY_HAVE_SIDE_EFFECT"
                                          |)) 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::iterator::Iterator",
                                              B,
                                              [],
                                              "__iterator_get_unchecked",
                                              []
                                            |),
                                            [
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| self |),
                                                "core::iter::adapters::zip::Zip",
                                                "b"
                                              |);
                                              M.read (| i |)
                                            ]
                                          |)
                                        |) in
                                      M.alloc (| Value.Tuple [] |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                ]
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    let~ _ :=
                                      M.alloc (|
                                        M.never_to_any (| M.read (| M.break (||) |) |)
                                      |) in
                                    M.alloc (| Value.Tuple [] |)
                                  |)
                                |)
                              |)))
                        ]
                      |)))
                  |) in
                M.alloc (|
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ],
                      "super_nth",
                      []
                    |),
                    [ M.read (| self |); BinOp.Wrap.sub (| M.read (| n |), M.read (| delta |) |) ]
                  |)
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        (*
            fn next_back(&mut self) -> Option<(A::Item, B::Item)>
            where
                A: DoubleEndedIterator + ExactSizeIterator,
                B: DoubleEndedIterator + ExactSizeIterator,
            {
                if A::MAY_HAVE_SIDE_EFFECT || B::MAY_HAVE_SIDE_EFFECT {
                    let sz_a = self.a.size();
                    let sz_b = self.b.size();
                    // Adjust a, b to equal length, make sure that only the first call
                    // of `next_back` does this, otherwise we will break the restriction
                    // on calls to `self.next_back()` after calling `get_unchecked()`.
                    if sz_a != sz_b {
                        let sz_a = self.a.size();
                        if A::MAY_HAVE_SIDE_EFFECT && sz_a > self.len {
                            for _ in 0..sz_a - self.len {
                                // since next_back() may panic we increment the counters beforehand
                                // to keep Zip's state in sync with the underlying iterator source
                                self.a_len -= 1;
                                self.a.next_back();
                            }
                            debug_assert_eq!(self.a_len, self.len);
                        }
                        let sz_b = self.b.size();
                        if B::MAY_HAVE_SIDE_EFFECT && sz_b > self.len {
                            for _ in 0..sz_b - self.len {
                                self.b.next_back();
                            }
                        }
                    }
                }
                if self.index < self.len {
                    // since get_unchecked executes code which can panic we increment the counters beforehand
                    // so that the same index won't be accessed twice, as required by TrustedRandomAccess
                    self.len -= 1;
                    self.a_len -= 1;
                    let i = self.len;
                    // SAFETY: `i` is smaller than the previous value of `self.len`,
                    // which is also smaller than or equal to `self.a.len()` and `self.b.len()`
                    unsafe {
                        Some((self.a.__iterator_get_unchecked(i), self.b.__iterator_get_unchecked(i)))
                    }
                } else {
                    None
                }
            }
        *)
        Definition next_back
            (A B : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.read (|
                let~ _ :=
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                LogicalOp.or (|
                                  M.read (|
                                    M.get_constant (|
                                      "core::iter::adapters::zip::TrustedRandomAccessNoCoerce::MAY_HAVE_SIDE_EFFECT"
                                    |)
                                  |),
                                  ltac:(M.monadic
                                    (M.read (|
                                      M.get_constant (|
                                        "core::iter::adapters::zip::TrustedRandomAccessNoCoerce::MAY_HAVE_SIDE_EFFECT"
                                      |)
                                    |)))
                                |)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          let~ sz_a :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::iter::adapters::zip::TrustedRandomAccessNoCoerce",
                                  A,
                                  [],
                                  "size",
                                  []
                                |),
                                [
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| self |),
                                    "core::iter::adapters::zip::Zip",
                                    "a"
                                  |)
                                ]
                              |)
                            |) in
                          let~ sz_b :=
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::iter::adapters::zip::TrustedRandomAccessNoCoerce",
                                  B,
                                  [],
                                  "size",
                                  []
                                |),
                                [
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| self |),
                                    "core::iter::adapters::zip::Zip",
                                    "b"
                                  |)
                                ]
                              |)
                            |) in
                          M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.use
                                      (M.alloc (|
                                        BinOp.ne (| M.read (| sz_a |), M.read (| sz_b |) |)
                                      |)) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ |),
                                      Value.Bool true
                                    |) in
                                  let~ sz_a :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::iter::adapters::zip::TrustedRandomAccessNoCoerce",
                                          A,
                                          [],
                                          "size",
                                          []
                                        |),
                                        [
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| self |),
                                            "core::iter::adapters::zip::Zip",
                                            "a"
                                          |)
                                        ]
                                      |)
                                    |) in
                                  let~ _ :=
                                    M.match_operator (|
                                      M.alloc (| Value.Tuple [] |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ :=
                                              M.use
                                                (M.alloc (|
                                                  LogicalOp.and (|
                                                    M.read (|
                                                      M.get_constant (|
                                                        "core::iter::adapters::zip::TrustedRandomAccessNoCoerce::MAY_HAVE_SIDE_EFFECT"
                                                      |)
                                                    |),
                                                    ltac:(M.monadic
                                                      (BinOp.gt (|
                                                        M.read (| sz_a |),
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (| self |),
                                                            "core::iter::adapters::zip::Zip",
                                                            "len"
                                                          |)
                                                        |)
                                                      |)))
                                                  |)
                                                |)) in
                                            let _ :=
                                              M.is_constant_or_break_match (|
                                                M.read (| γ |),
                                                Value.Bool true
                                              |) in
                                            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::ops::range::Range")
                                                          []
                                                          [ Ty.path "usize" ],
                                                        [],
                                                        "into_iter",
                                                        []
                                                      |),
                                                      [
                                                        Value.StructRecord
                                                          "core::ops::range::Range"
                                                          [
                                                            ("start",
                                                              Value.Integer IntegerKind.Usize 0);
                                                            ("end_",
                                                              BinOp.Wrap.sub (|
                                                                M.read (| sz_a |),
                                                                M.read (|
                                                                  M.SubPointer.get_struct_record_field (|
                                                                    M.read (| self |),
                                                                    "core::iter::adapters::zip::Zip",
                                                                    "len"
                                                                  |)
                                                                |)
                                                              |))
                                                          ]
                                                      ]
                                                    |)
                                                  |),
                                                  [
                                                    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::ops::range::Range")
                                                                        []
                                                                        [ Ty.path "usize" ],
                                                                      [],
                                                                      "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~ _ :=
                                                                        let β :=
                                                                          M.SubPointer.get_struct_record_field (|
                                                                            M.read (| self |),
                                                                            "core::iter::adapters::zip::Zip",
                                                                            "a_len"
                                                                          |) in
                                                                        M.write (|
                                                                          β,
                                                                          BinOp.Wrap.sub (|
                                                                            M.read (| β |),
                                                                            Value.Integer
                                                                              IntegerKind.Usize
                                                                              1
                                                                          |)
                                                                        |) in
                                                                      let~ _ :=
                                                                        M.alloc (|
                                                                          M.call_closure (|
                                                                            M.get_trait_method (|
                                                                              "core::iter::traits::double_ended::DoubleEndedIterator",
                                                                              A,
                                                                              [],
                                                                              "next_back",
                                                                              []
                                                                            |),
                                                                            [
                                                                              M.SubPointer.get_struct_record_field (|
                                                                                M.read (| self |),
                                                                                "core::iter::adapters::zip::Zip",
                                                                                "a"
                                                                              |)
                                                                            ]
                                                                          |)
                                                                        |) in
                                                                      M.alloc (| Value.Tuple [] |)))
                                                                ]
                                                              |) in
                                                            M.alloc (| Value.Tuple [] |)))
                                                        |)))
                                                  ]
                                                |)) in
                                            let~ _ :=
                                              M.match_operator (|
                                                M.alloc (| Value.Tuple [] |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ :=
                                                        M.use (M.alloc (| Value.Bool true |)) in
                                                      let _ :=
                                                        M.is_constant_or_break_match (|
                                                          M.read (| γ |),
                                                          Value.Bool true
                                                        |) in
                                                      let~ _ :=
                                                        M.match_operator (|
                                                          M.alloc (|
                                                            Value.Tuple
                                                              [
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (| self |),
                                                                  "core::iter::adapters::zip::Zip",
                                                                  "a_len"
                                                                |);
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (| self |),
                                                                  "core::iter::adapters::zip::Zip",
                                                                  "len"
                                                                |)
                                                              ]
                                                          |),
                                                          [
                                                            fun γ =>
                                                              ltac:(M.monadic
                                                                (let γ0_0 :=
                                                                  M.SubPointer.get_tuple_field (|
                                                                    γ,
                                                                    0
                                                                  |) in
                                                                let γ0_1 :=
                                                                  M.SubPointer.get_tuple_field (|
                                                                    γ,
                                                                    1
                                                                  |) in
                                                                let left_val := M.copy (| γ0_0 |) in
                                                                let right_val :=
                                                                  M.copy (| γ0_1 |) in
                                                                M.match_operator (|
                                                                  M.alloc (| Value.Tuple [] |),
                                                                  [
                                                                    fun γ =>
                                                                      ltac:(M.monadic
                                                                        (let γ :=
                                                                          M.use
                                                                            (M.alloc (|
                                                                              UnOp.not (|
                                                                                BinOp.eq (|
                                                                                  M.read (|
                                                                                    M.read (|
                                                                                      left_val
                                                                                    |)
                                                                                  |),
                                                                                  M.read (|
                                                                                    M.read (|
                                                                                      right_val
                                                                                    |)
                                                                                  |)
                                                                                |)
                                                                              |)
                                                                            |)) in
                                                                        let _ :=
                                                                          M.is_constant_or_break_match (|
                                                                            M.read (| γ |),
                                                                            Value.Bool true
                                                                          |) in
                                                                        M.alloc (|
                                                                          M.never_to_any (|
                                                                            M.read (|
                                                                              let~ kind :=
                                                                                M.alloc (|
                                                                                  Value.StructTuple
                                                                                    "core::panicking::AssertKind::Eq"
                                                                                    []
                                                                                |) in
                                                                              M.alloc (|
                                                                                M.call_closure (|
                                                                                  M.get_function (|
                                                                                    "core::panicking::assert_failed",
                                                                                    [
                                                                                      Ty.path
                                                                                        "usize";
                                                                                      Ty.path
                                                                                        "usize"
                                                                                    ]
                                                                                  |),
                                                                                  [
                                                                                    M.read (|
                                                                                      kind
                                                                                    |);
                                                                                    M.read (|
                                                                                      left_val
                                                                                    |);
                                                                                    M.read (|
                                                                                      right_val
                                                                                    |);
                                                                                    Value.StructTuple
                                                                                      "core::option::Option::None"
                                                                                      []
                                                                                  ]
                                                                                |)
                                                                              |)
                                                                            |)
                                                                          |)
                                                                        |)));
                                                                    fun γ =>
                                                                      ltac:(M.monadic
                                                                        (M.alloc (|
                                                                          Value.Tuple []
                                                                        |)))
                                                                  ]
                                                                |)))
                                                          ]
                                                        |) in
                                                      M.alloc (| Value.Tuple [] |)));
                                                  fun γ =>
                                                    ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                                ]
                                              |) in
                                            M.alloc (| Value.Tuple [] |)));
                                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  let~ sz_b :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::iter::adapters::zip::TrustedRandomAccessNoCoerce",
                                          B,
                                          [],
                                          "size",
                                          []
                                        |),
                                        [
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| self |),
                                            "core::iter::adapters::zip::Zip",
                                            "b"
                                          |)
                                        ]
                                      |)
                                    |) in
                                  M.match_operator (|
                                    M.alloc (| Value.Tuple [] |),
                                    [
                                      fun γ =>
                                        ltac:(M.monadic
                                          (let γ :=
                                            M.use
                                              (M.alloc (|
                                                LogicalOp.and (|
                                                  M.read (|
                                                    M.get_constant (|
                                                      "core::iter::adapters::zip::TrustedRandomAccessNoCoerce::MAY_HAVE_SIDE_EFFECT"
                                                    |)
                                                  |),
                                                  ltac:(M.monadic
                                                    (BinOp.gt (|
                                                      M.read (| sz_b |),
                                                      M.read (|
                                                        M.SubPointer.get_struct_record_field (|
                                                          M.read (| self |),
                                                          "core::iter::adapters::zip::Zip",
                                                          "len"
                                                        |)
                                                      |)
                                                    |)))
                                                |)
                                              |)) in
                                          let _ :=
                                            M.is_constant_or_break_match (|
                                              M.read (| γ |),
                                              Value.Bool true
                                            |) in
                                          M.use
                                            (M.match_operator (|
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::iter::traits::collect::IntoIterator",
                                                    Ty.apply
                                                      (Ty.path "core::ops::range::Range")
                                                      []
                                                      [ Ty.path "usize" ],
                                                    [],
                                                    "into_iter",
                                                    []
                                                  |),
                                                  [
                                                    Value.StructRecord
                                                      "core::ops::range::Range"
                                                      [
                                                        ("start",
                                                          Value.Integer IntegerKind.Usize 0);
                                                        ("end_",
                                                          BinOp.Wrap.sub (|
                                                            M.read (| sz_b |),
                                                            M.read (|
                                                              M.SubPointer.get_struct_record_field (|
                                                                M.read (| self |),
                                                                "core::iter::adapters::zip::Zip",
                                                                "len"
                                                              |)
                                                            |)
                                                          |))
                                                      ]
                                                  ]
                                                |)
                                              |),
                                              [
                                                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::ops::range::Range")
                                                                    []
                                                                    [ Ty.path "usize" ],
                                                                  [],
                                                                  "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~ _ :=
                                                                    M.alloc (|
                                                                      M.call_closure (|
                                                                        M.get_trait_method (|
                                                                          "core::iter::traits::double_ended::DoubleEndedIterator",
                                                                          B,
                                                                          [],
                                                                          "next_back",
                                                                          []
                                                                        |),
                                                                        [
                                                                          M.SubPointer.get_struct_record_field (|
                                                                            M.read (| self |),
                                                                            "core::iter::adapters::zip::Zip",
                                                                            "b"
                                                                          |)
                                                                        ]
                                                                      |)
                                                                    |) in
                                                                  M.alloc (| Value.Tuple [] |)))
                                                            ]
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)))
                                                    |)))
                                              ]
                                            |))));
                                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                    ]
                                  |)));
                              fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                            ]
                          |)));
                      fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                    ]
                  |) in
                M.match_operator (|
                  M.alloc (| Value.Tuple [] |),
                  [
                    fun γ =>
                      ltac:(M.monadic
                        (let γ :=
                          M.use
                            (M.alloc (|
                              BinOp.lt (|
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| self |),
                                    "core::iter::adapters::zip::Zip",
                                    "index"
                                  |)
                                |),
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| self |),
                                    "core::iter::adapters::zip::Zip",
                                    "len"
                                  |)
                                |)
                              |)
                            |)) in
                        let _ :=
                          M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                        let~ _ :=
                          let β :=
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::zip::Zip",
                              "len"
                            |) in
                          M.write (|
                            β,
                            BinOp.Wrap.sub (| M.read (| β |), Value.Integer IntegerKind.Usize 1 |)
                          |) in
                        let~ _ :=
                          let β :=
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::zip::Zip",
                              "a_len"
                            |) in
                          M.write (|
                            β,
                            BinOp.Wrap.sub (| M.read (| β |), Value.Integer IntegerKind.Usize 1 |)
                          |) in
                        let~ i :=
                          M.copy (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "core::iter::adapters::zip::Zip",
                              "len"
                            |)
                          |) in
                        M.alloc (|
                          Value.StructTuple
                            "core::option::Option::Some"
                            [
                              Value.Tuple
                                [
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::iter::traits::iterator::Iterator",
                                      A,
                                      [],
                                      "__iterator_get_unchecked",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| self |),
                                        "core::iter::adapters::zip::Zip",
                                        "a"
                                      |);
                                      M.read (| i |)
                                    ]
                                  |);
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::iter::traits::iterator::Iterator",
                                      B,
                                      [],
                                      "__iterator_get_unchecked",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| self |),
                                        "core::iter::adapters::zip::Zip",
                                        "b"
                                      |);
                                      M.read (| i |)
                                    ]
                                  |)
                                ]
                            ]
                        |)));
                    fun γ =>
                      ltac:(M.monadic
                        (M.alloc (| Value.StructTuple "core::option::Option::None" [] |)))
                  ]
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::adapters::zip::ZipImpl"
            (Self A B)
            (* Trait polymorphic types *) [ (* A *) A; (* B *) B ]
            (* Instance *)
            [
              ("new", InstanceField.Method (new A B));
              ("next", InstanceField.Method (next A B));
              ("size_hint", InstanceField.Method (size_hint A B));
              ("nth", InstanceField.Method (nth A B));
              ("next_back", InstanceField.Method (next_back A B))
            ].
      End Impl_core_iter_adapters_zip_ZipImpl_where_core_iter_adapters_zip_TrustedRandomAccess_A_where_core_iter_traits_iterator_Iterator_A_where_core_iter_adapters_zip_TrustedRandomAccess_B_where_core_iter_traits_iterator_Iterator_B_A_B_for_core_iter_adapters_zip_Zip_A_B.
      
      Module Impl_core_iter_traits_exact_size_ExactSizeIterator_where_core_iter_traits_exact_size_ExactSizeIterator_A_where_core_iter_traits_exact_size_ExactSizeIterator_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::traits::exact_size::ExactSizeIterator"
            (Self A B)
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_core_iter_traits_exact_size_ExactSizeIterator_where_core_iter_traits_exact_size_ExactSizeIterator_A_where_core_iter_traits_exact_size_ExactSizeIterator_B_for_core_iter_adapters_zip_Zip_A_B.
      
      Module Impl_core_iter_adapters_zip_TrustedRandomAccess_where_core_iter_adapters_zip_TrustedRandomAccess_A_where_core_iter_adapters_zip_TrustedRandomAccess_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::adapters::zip::TrustedRandomAccess"
            (Self A B)
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_core_iter_adapters_zip_TrustedRandomAccess_where_core_iter_adapters_zip_TrustedRandomAccess_A_where_core_iter_adapters_zip_TrustedRandomAccess_B_for_core_iter_adapters_zip_Zip_A_B.
      
      Module Impl_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_where_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_A_where_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        (*     const MAY_HAVE_SIDE_EFFECT: bool = A::MAY_HAVE_SIDE_EFFECT || B::MAY_HAVE_SIDE_EFFECT; *)
        (* Ty.path "bool" *)
        Definition value_MAY_HAVE_SIDE_EFFECT (A B : Ty.t) : Value.t :=
          let Self : Ty.t := Self A B in
          M.run
            ltac:(M.monadic
              (M.alloc (|
                LogicalOp.or (|
                  M.read (|
                    M.get_constant (|
                      "core::iter::adapters::zip::TrustedRandomAccessNoCoerce::MAY_HAVE_SIDE_EFFECT"
                    |)
                  |),
                  ltac:(M.monadic
                    (M.read (|
                      M.get_constant (|
                        "core::iter::adapters::zip::TrustedRandomAccessNoCoerce::MAY_HAVE_SIDE_EFFECT"
                      |)
                    |)))
                |)
              |))).
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::adapters::zip::TrustedRandomAccessNoCoerce"
            (Self A B)
            (* Trait polymorphic types *) []
            (* Instance *)
            [
              ("value_MAY_HAVE_SIDE_EFFECT",
                InstanceField.Constant (value_MAY_HAVE_SIDE_EFFECT A B))
            ].
      End Impl_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_where_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_A_where_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_B_for_core_iter_adapters_zip_Zip_A_B.
      
      Module Impl_core_iter_traits_marker_FusedIterator_where_core_iter_traits_marker_FusedIterator_A_where_core_iter_traits_marker_FusedIterator_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::traits::marker::FusedIterator"
            (Self A B)
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_core_iter_traits_marker_FusedIterator_where_core_iter_traits_marker_FusedIterator_A_where_core_iter_traits_marker_FusedIterator_B_for_core_iter_adapters_zip_Zip_A_B.
      
      Module Impl_core_iter_traits_marker_TrustedFused_where_core_iter_traits_marker_TrustedFused_A_where_core_iter_traits_marker_TrustedFused_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::traits::marker::TrustedFused"
            (Self A B)
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_core_iter_traits_marker_TrustedFused_where_core_iter_traits_marker_TrustedFused_A_where_core_iter_traits_marker_TrustedFused_B_for_core_iter_adapters_zip_Zip_A_B.
      
      Module Impl_core_iter_traits_marker_TrustedLen_where_core_iter_traits_marker_TrustedLen_A_where_core_iter_traits_marker_TrustedLen_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::traits::marker::TrustedLen"
            (Self A B)
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_core_iter_traits_marker_TrustedLen_where_core_iter_traits_marker_TrustedLen_A_where_core_iter_traits_marker_TrustedLen_B_for_core_iter_adapters_zip_Zip_A_B.
      
      Module Impl_core_iter_traits_unchecked_iterator_UncheckedIterator_where_core_iter_traits_unchecked_iterator_UncheckedIterator_A_where_core_iter_traits_unchecked_iterator_UncheckedIterator_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::traits::unchecked_iterator::UncheckedIterator"
            (Self A B)
            (* Trait polymorphic types *) []
            (* Instance *) [].
      End Impl_core_iter_traits_unchecked_iterator_UncheckedIterator_where_core_iter_traits_unchecked_iterator_UncheckedIterator_A_where_core_iter_traits_unchecked_iterator_UncheckedIterator_B_for_core_iter_adapters_zip_Zip_A_B.
      
      Module Impl_core_iter_adapters_SourceIter_where_core_iter_adapters_SourceIter_A_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        (*     type Source = A::Source; *)
        Definition _Source (A B : Ty.t) : Ty.t := Ty.associated.
        
        (*
            unsafe fn as_inner(&mut self) -> &mut A::Source {
                // SAFETY: unsafe function forwarding to unsafe function with the same requirements
                unsafe { SourceIter::as_inner(&mut self.a) }
            }
        *)
        Definition as_inner
            (A B : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [], [ self ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              M.call_closure (|
                M.get_trait_method (| "core::iter::adapters::SourceIter", A, [], "as_inner", [] |),
                [
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "core::iter::adapters::zip::Zip",
                    "a"
                  |)
                ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::adapters::SourceIter"
            (Self A B)
            (* Trait polymorphic types *) []
            (* Instance *)
            [
              ("Source", InstanceField.Ty (_Source A B));
              ("as_inner", InstanceField.Method (as_inner A B))
            ].
      End Impl_core_iter_adapters_SourceIter_where_core_iter_adapters_SourceIter_A_for_core_iter_adapters_zip_Zip_A_B.
      
      Module Impl_core_iter_traits_marker_InPlaceIterable_where_core_iter_traits_marker_InPlaceIterable_A_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        (*     const EXPAND_BY: Option<NonZero<usize>> = A::EXPAND_BY; *)
        (* Ty.apply
          (Ty.path "core::option::Option")
          []
          [ Ty.apply (Ty.path "core::num::nonzero::NonZero") [] [ Ty.path "usize" ] ] *)
        Definition value_EXPAND_BY (A B : Ty.t) : Value.t :=
          let Self : Ty.t := Self A B in
          M.run
            ltac:(M.monadic
              (M.get_constant (| "core::iter::traits::marker::InPlaceIterable::EXPAND_BY" |))).
        
        (*     const MERGE_BY: Option<NonZero<usize>> = A::MERGE_BY; *)
        (* Ty.apply
          (Ty.path "core::option::Option")
          []
          [ Ty.apply (Ty.path "core::num::nonzero::NonZero") [] [ Ty.path "usize" ] ] *)
        Definition value_MERGE_BY (A B : Ty.t) : Value.t :=
          let Self : Ty.t := Self A B in
          M.run
            ltac:(M.monadic
              (M.get_constant (| "core::iter::traits::marker::InPlaceIterable::MERGE_BY" |))).
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::traits::marker::InPlaceIterable"
            (Self A B)
            (* Trait polymorphic types *) []
            (* Instance *)
            [
              ("value_EXPAND_BY", InstanceField.Constant (value_EXPAND_BY A B));
              ("value_MERGE_BY", InstanceField.Constant (value_MERGE_BY A B))
            ].
      End Impl_core_iter_traits_marker_InPlaceIterable_where_core_iter_traits_marker_InPlaceIterable_A_for_core_iter_adapters_zip_Zip_A_B.
      
      Module Impl_core_fmt_Debug_where_core_fmt_Debug_A_where_core_fmt_Debug_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        (*
            fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
                ZipFmt::fmt(self, f)
            }
        *)
        Definition fmt (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          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::iter::adapters::zip::ZipFmt",
                  Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ],
                  [ A; B ],
                  "fmt",
                  []
                |),
                [ M.read (| self |); M.read (| f |) ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::fmt::Debug"
            (Self A B)
            (* Trait polymorphic types *) []
            (* Instance *) [ ("fmt", InstanceField.Method (fmt A B)) ].
      End Impl_core_fmt_Debug_where_core_fmt_Debug_A_where_core_fmt_Debug_B_for_core_iter_adapters_zip_Zip_A_B.
      
      (* Trait *)
      (* Empty module 'ZipFmt' *)
      
      Module Impl_core_iter_adapters_zip_ZipFmt_where_core_fmt_Debug_A_where_core_fmt_Debug_B_A_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        (*
            default fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
                f.debug_struct("Zip").field("a", &self.a).field("b", &self.b).finish()
            }
        *)
        Definition fmt (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          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::builders::DebugStruct",
                  "finish",
                  []
                |),
                [
                  M.call_closure (|
                    M.get_associated_function (|
                      Ty.path "core::fmt::builders::DebugStruct",
                      "field",
                      []
                    |),
                    [
                      M.call_closure (|
                        M.get_associated_function (|
                          Ty.path "core::fmt::builders::DebugStruct",
                          "field",
                          []
                        |),
                        [
                          M.alloc (|
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.path "core::fmt::Formatter",
                                "debug_struct",
                                []
                              |),
                              [ M.read (| f |); M.read (| Value.String "Zip" |) ]
                            |)
                          |);
                          M.read (| Value.String "a" |);
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "core::iter::adapters::zip::Zip",
                            "a"
                          |)
                        ]
                      |);
                      M.read (| Value.String "b" |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "core::iter::adapters::zip::Zip",
                        "b"
                      |)
                    ]
                  |)
                ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::adapters::zip::ZipFmt"
            (Self A B)
            (* Trait polymorphic types *) [ (* A *) A; (* B *) B ]
            (* Instance *) [ ("fmt", InstanceField.Method (fmt A B)) ].
      End Impl_core_iter_adapters_zip_ZipFmt_where_core_fmt_Debug_A_where_core_fmt_Debug_B_A_B_for_core_iter_adapters_zip_Zip_A_B.
      
      Module Impl_core_iter_adapters_zip_ZipFmt_where_core_fmt_Debug_A_where_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_A_where_core_fmt_Debug_B_where_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_B_A_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        (*
            fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
                // It's *not safe* to call fmt on the contained iterators, since once
                // we start iterating they're in strange, potentially unsafe, states.
                f.debug_struct("Zip").finish()
            }
        *)
        Definition fmt (A B : Ty.t) (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
          let Self : Ty.t := Self A B in
          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::builders::DebugStruct",
                  "finish",
                  []
                |),
                [
                  M.alloc (|
                    M.call_closure (|
                      M.get_associated_function (|
                        Ty.path "core::fmt::Formatter",
                        "debug_struct",
                        []
                      |),
                      [ M.read (| f |); M.read (| Value.String "Zip" |) ]
                    |)
                  |)
                ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::adapters::zip::ZipFmt"
            (Self A B)
            (* Trait polymorphic types *) [ (* A *) A; (* B *) B ]
            (* Instance *) [ ("fmt", InstanceField.Method (fmt A B)) ].
      End Impl_core_iter_adapters_zip_ZipFmt_where_core_fmt_Debug_A_where_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_A_where_core_fmt_Debug_B_where_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_B_A_B_for_core_iter_adapters_zip_Zip_A_B.
      
      (* Trait *)
      (* Empty module 'TrustedRandomAccess' *)
      
      (* Trait *)
      Module TrustedRandomAccessNoCoerce.
        Definition size (Self : Ty.t) (ε : 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.SubPointer.get_tuple_field (|
                  M.alloc (|
                    M.call_closure (|
                      M.get_trait_method (|
                        "core::iter::traits::iterator::Iterator",
                        Self,
                        [],
                        "size_hint",
                        []
                      |),
                      [ M.read (| self |) ]
                    |)
                  |),
                  0
                |)
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom ProvidedMethod_size :
          M.IsProvidedMethod "core::iter::adapters::zip::TrustedRandomAccessNoCoerce" "size" size.
      End TrustedRandomAccessNoCoerce.
      
      (*
      pub(in crate::iter::adapters) unsafe fn try_get_unchecked<I>(it: &mut I, idx: usize) -> I::Item
      where
          I: Iterator,
      {
          // SAFETY: the caller must uphold the contract for
          // `Iterator::__iterator_get_unchecked`.
          unsafe { it.try_get_unchecked(idx) }
      }
      *)
      Definition try_get_unchecked (ε : list Value.t) (τ : list Ty.t) (α : list Value.t) : M :=
        match ε, τ, α with
        | [], [ _ as I ], [ it; idx ] =>
          ltac:(M.monadic
            (let it := M.alloc (| it |) in
            let idx := M.alloc (| idx |) in
            M.call_closure (|
              M.get_trait_method (|
                "core::iter::adapters::zip::SpecTrustedRandomAccess",
                I,
                [],
                "try_get_unchecked",
                []
              |),
              [ M.read (| it |); M.read (| idx |) ]
            |)))
        | _, _, _ => M.impossible "wrong number of arguments"
        end.
      
      Axiom Function_try_get_unchecked :
        M.IsFunction "core::iter::adapters::zip::try_get_unchecked" try_get_unchecked.
      
      (* Trait *)
      (* Empty module 'SpecTrustedRandomAccess' *)
      
      Module Impl_core_iter_adapters_zip_SpecTrustedRandomAccess_where_core_iter_traits_iterator_Iterator_I_for_I.
        Definition Self (I : Ty.t) : Ty.t := I.
        
        (*
            default unsafe fn try_get_unchecked(&mut self, _: usize) -> Self::Item {
                panic!("Should only be called on TrustedRandomAccess iterators");
            }
        *)
        Definition try_get_unchecked
            (I : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self I in
          match ε, τ, α with
          | [], [], [ self; β1 ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              let β1 := M.alloc (| β1 |) in
              M.match_operator (|
                β1,
                [
                  fun γ =>
                    ltac:(M.monadic
                      (M.never_to_any (|
                        M.call_closure (|
                          M.get_function (| "core::panicking::panic_fmt", [] |),
                          [
                            M.call_closure (|
                              M.get_associated_function (|
                                Ty.path "core::fmt::Arguments",
                                "new_const",
                                []
                              |),
                              [
                                M.alloc (|
                                  Value.Array
                                    [
                                      M.read (|
                                        Value.String
                                          "Should only be called on TrustedRandomAccess iterators"
                                      |)
                                    ]
                                |)
                              ]
                            |)
                          ]
                        |)
                      |)))
                ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (I : Ty.t),
          M.IsTraitInstance
            "core::iter::adapters::zip::SpecTrustedRandomAccess"
            (Self I)
            (* Trait polymorphic types *) []
            (* Instance *) [ ("try_get_unchecked", InstanceField.Method (try_get_unchecked I)) ].
      End Impl_core_iter_adapters_zip_SpecTrustedRandomAccess_where_core_iter_traits_iterator_Iterator_I_for_I.
      
      Module Impl_core_iter_adapters_zip_SpecTrustedRandomAccess_where_core_iter_traits_iterator_Iterator_I_where_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_I_for_I.
        Definition Self (I : Ty.t) : Ty.t := I.
        
        (*
            unsafe fn try_get_unchecked(&mut self, index: usize) -> Self::Item {
                // SAFETY: the caller must uphold the contract for
                // `Iterator::__iterator_get_unchecked`.
                unsafe { self.__iterator_get_unchecked(index) }
            }
        *)
        Definition try_get_unchecked
            (I : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self I in
          match ε, τ, α with
          | [], [], [ self; index ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              let index := M.alloc (| index |) in
              M.call_closure (|
                M.get_trait_method (|
                  "core::iter::traits::iterator::Iterator",
                  I,
                  [],
                  "__iterator_get_unchecked",
                  []
                |),
                [ M.read (| self |); M.read (| index |) ]
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (I : Ty.t),
          M.IsTraitInstance
            "core::iter::adapters::zip::SpecTrustedRandomAccess"
            (Self I)
            (* Trait polymorphic types *) []
            (* Instance *) [ ("try_get_unchecked", InstanceField.Method (try_get_unchecked I)) ].
      End Impl_core_iter_adapters_zip_SpecTrustedRandomAccess_where_core_iter_traits_iterator_Iterator_I_where_core_iter_adapters_zip_TrustedRandomAccessNoCoerce_I_for_I.
      
      (* Trait *)
      (* Empty module 'SpecFold' *)
      
      Module Impl_core_iter_adapters_zip_SpecFold_where_core_iter_traits_iterator_Iterator_A_where_core_iter_traits_iterator_Iterator_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        (*
            default fn spec_fold<Acc, F>(mut self, init: Acc, mut f: F) -> Acc
            where
                F: FnMut(Acc, Self::Item) -> Acc,
            {
                let mut accum = init;
                while let Some(x) = ZipImpl::next(&mut self) {
                    accum = f(accum, x);
                }
                accum
            }
        *)
        Definition spec_fold
            (A B : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [ Acc; F ], [ self; init; f ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              let init := M.alloc (| init |) in
              let f := M.alloc (| f |) in
              M.read (|
                let~ accum := M.copy (| init |) in
                let~ _ :=
                  M.loop (|
                    ltac:(M.monadic
                      (M.match_operator (|
                        M.alloc (| Value.Tuple [] |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ :=
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::iter::adapters::zip::ZipImpl",
                                      Ty.apply
                                        (Ty.path "core::iter::adapters::zip::Zip")
                                        []
                                        [ A; B ],
                                      [ A; B ],
                                      "next",
                                      []
                                    |),
                                    [ self ]
                                  |)
                                |) in
                              let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::option::Option::Some",
                                  0
                                |) in
                              let x := M.copy (| γ0_0 |) in
                              let~ _ :=
                                M.write (|
                                  accum,
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::function::FnMut",
                                      F,
                                      [ Ty.tuple [ Acc; Ty.tuple [ Ty.associated; Ty.associated ] ]
                                      ],
                                      "call_mut",
                                      []
                                    |),
                                    [ f; Value.Tuple [ M.read (| accum |); M.read (| x |) ] ]
                                  |)
                                |) in
                              M.alloc (| Value.Tuple [] |)));
                          fun γ =>
                            ltac:(M.monadic
                              (M.alloc (|
                                M.never_to_any (|
                                  M.read (|
                                    let~ _ :=
                                      M.alloc (|
                                        M.never_to_any (| M.read (| M.break (||) |) |)
                                      |) in
                                    M.alloc (| Value.Tuple [] |)
                                  |)
                                |)
                              |)))
                        ]
                      |)))
                  |) in
                accum
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::adapters::zip::SpecFold"
            (Self A B)
            (* Trait polymorphic types *) []
            (* Instance *) [ ("spec_fold", InstanceField.Method (spec_fold A B)) ].
      End Impl_core_iter_adapters_zip_SpecFold_where_core_iter_traits_iterator_Iterator_A_where_core_iter_traits_iterator_Iterator_B_for_core_iter_adapters_zip_Zip_A_B.
      
      Module Impl_core_iter_adapters_zip_SpecFold_where_core_iter_traits_marker_TrustedLen_A_where_core_iter_traits_marker_TrustedLen_B_for_core_iter_adapters_zip_Zip_A_B.
        Definition Self (A B : Ty.t) : Ty.t :=
          Ty.apply (Ty.path "core::iter::adapters::zip::Zip") [] [ A; B ].
        
        (*
            fn spec_fold<Acc, F>(mut self, init: Acc, mut f: F) -> Acc
            where
                F: FnMut(Acc, Self::Item) -> Acc,
            {
                let mut accum = init;
                loop {
                    let (upper, more) = if let Some(upper) = ZipImpl::size_hint(&self).1 {
                        (upper, false)
                    } else {
                        // Per TrustedLen contract a None upper bound means more than usize::MAX items
                        (usize::MAX, true)
                    };
        
                    for _ in 0..upper {
                        let pair =
                            // SAFETY: TrustedLen guarantees that at least `upper` many items are available
                            // therefore we know they can't be None
                            unsafe { (self.a.next().unwrap_unchecked(), self.b.next().unwrap_unchecked()) };
                        accum = f(accum, pair);
                    }
        
                    if !more {
                        break;
                    }
                }
                accum
            }
        *)
        Definition spec_fold
            (A B : Ty.t)
            (ε : list Value.t)
            (τ : list Ty.t)
            (α : list Value.t)
            : M :=
          let Self : Ty.t := Self A B in
          match ε, τ, α with
          | [], [ Acc; F ], [ self; init; f ] =>
            ltac:(M.monadic
              (let self := M.alloc (| self |) in
              let init := M.alloc (| init |) in
              let f := M.alloc (| f |) in
              M.read (|
                let~ accum := M.copy (| init |) in
                let~ _ :=
                  M.loop (|
                    ltac:(M.monadic
                      (M.match_operator (|
                        M.match_operator (|
                          M.alloc (| Value.Tuple [] |),
                          [
                            fun γ =>
                              ltac:(M.monadic
                                (let γ :=
                                  M.SubPointer.get_tuple_field (|
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::iter::adapters::zip::ZipImpl",
                                          Ty.apply
                                            (Ty.path "core::iter::adapters::zip::Zip")
                                            []
                                            [ A; B ],
                                          [ A; B ],
                                          "size_hint",
                                          []
                                        |),
                                        [ self ]
                                      |)
                                    |),
                                    1
                                  |) in
                                let γ0_0 :=
                                  M.SubPointer.get_struct_tuple_field (|
                                    γ,
                                    "core::option::Option::Some",
                                    0
                                  |) in
                                let upper := M.copy (| γ0_0 |) in
                                M.alloc (|
                                  Value.Tuple [ M.read (| upper |); Value.Bool false ]
                                |)));
                            fun γ =>
                              ltac:(M.monadic
                                (M.alloc (|
                                  Value.Tuple
                                    [
                                      M.read (| M.get_constant (| "core::num::MAX" |) |);
                                      Value.Bool true
                                    ]
                                |)))
                          ]
                        |),
                        [
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in
                              let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in
                              let upper := M.copy (| γ0_0 |) in
                              let more := M.copy (| γ0_1 |) in
                              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::ops::range::Range")
                                            []
                                            [ Ty.path "usize" ],
                                          [],
                                          "into_iter",
                                          []
                                        |),
                                        [
                                          Value.StructRecord
                                            "core::ops::range::Range"
                                            [
                                              ("start", Value.Integer IntegerKind.Usize 0);
                                              ("end_", M.read (| upper |))
                                            ]
                                        ]
                                      |)
                                    |),
                                    [
                                      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::ops::range::Range")
                                                          []
                                                          [ Ty.path "usize" ],
                                                        [],
                                                        "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~ pair_ :=
                                                          M.alloc (|
                                                            Value.Tuple
                                                              [
                                                                M.call_closure (|
                                                                  M.get_associated_function (|
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::option::Option")
                                                                      []
                                                                      [ Ty.associated ],
                                                                    "unwrap_unchecked",
                                                                    []
                                                                  |),
                                                                  [
                                                                    M.call_closure (|
                                                                      M.get_trait_method (|
                                                                        "core::iter::traits::iterator::Iterator",
                                                                        A,
                                                                        [],
                                                                        "next",
                                                                        []
                                                                      |),
                                                                      [
                                                                        M.SubPointer.get_struct_record_field (|
                                                                          self,
                                                                          "core::iter::adapters::zip::Zip",
                                                                          "a"
                                                                        |)
                                                                      ]
                                                                    |)
                                                                  ]
                                                                |);
                                                                M.call_closure (|
                                                                  M.get_associated_function (|
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::option::Option")
                                                                      []
                                                                      [ Ty.associated ],
                                                                    "unwrap_unchecked",
                                                                    []
                                                                  |),
                                                                  [
                                                                    M.call_closure (|
                                                                      M.get_trait_method (|
                                                                        "core::iter::traits::iterator::Iterator",
                                                                        B,
                                                                        [],
                                                                        "next",
                                                                        []
                                                                      |),
                                                                      [
                                                                        M.SubPointer.get_struct_record_field (|
                                                                          self,
                                                                          "core::iter::adapters::zip::Zip",
                                                                          "b"
                                                                        |)
                                                                      ]
                                                                    |)
                                                                  ]
                                                                |)
                                                              ]
                                                          |) in
                                                        let~ _ :=
                                                          M.write (|
                                                            accum,
                                                            M.call_closure (|
                                                              M.get_trait_method (|
                                                                "core::ops::function::FnMut",
                                                                F,
                                                                [
                                                                  Ty.tuple
                                                                    [
                                                                      Acc;
                                                                      Ty.tuple
                                                                        [
                                                                          Ty.associated;
                                                                          Ty.associated
                                                                        ]
                                                                    ]
                                                                ],
                                                                "call_mut",
                                                                []
                                                              |),
                                                              [
                                                                f;
                                                                Value.Tuple
                                                                  [
                                                                    M.read (| accum |);
                                                                    M.read (| pair_ |)
                                                                  ]
                                                              ]
                                                            |)
                                                          |) in
                                                        M.alloc (| Value.Tuple [] |)))
                                                  ]
                                                |) in
                                              M.alloc (| Value.Tuple [] |)))
                                          |)))
                                    ]
                                  |)) in
                              M.match_operator (|
                                M.alloc (| Value.Tuple [] |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ :=
                                        M.use (M.alloc (| UnOp.not (| M.read (| more |) |) |)) in
                                      let _ :=
                                        M.is_constant_or_break_match (|
                                          M.read (| γ |),
                                          Value.Bool true
                                        |) in
                                      M.alloc (|
                                        M.never_to_any (| M.read (| M.break (||) |) |)
                                      |)));
                                  fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                ]
                              |)))
                        ]
                      |)))
                  |) in
                accum
              |)))
          | _, _, _ => M.impossible "wrong number of arguments"
          end.
        
        Axiom Implements :
          forall (A B : Ty.t),
          M.IsTraitInstance
            "core::iter::adapters::zip::SpecFold"
            (Self A B)
            (* Trait polymorphic types *) []
            (* Instance *) [ ("spec_fold", InstanceField.Method (spec_fold A B)) ].
      End Impl_core_iter_adapters_zip_SpecFold_where_core_iter_traits_marker_TrustedLen_A_where_core_iter_traits_marker_TrustedLen_B_for_core_iter_adapters_zip_Zip_A_B.
    End zip.
  End adapters.
End iter.
