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

Module pod.
  (* StructRecord
    {
      name := "PodMint";
      ty_params := [];
      fields :=
        [
          ("mint_authority",
            Ty.apply
              (Ty.path "spl_token_2022::pod::PodCOption")
              [ Ty.path "solana_program::pubkey::Pubkey" ]);
          ("supply", Ty.path "spl_pod::primitives::PodU64");
          ("decimals", Ty.path "u8");
          ("is_initialized", Ty.path "spl_pod::primitives::PodBool");
          ("freeze_authority",
            Ty.apply
              (Ty.path "spl_token_2022::pod::PodCOption")
              [ Ty.path "solana_program::pubkey::Pubkey" ])
        ];
    } *)
  
  Module Impl_core_clone_Clone_for_spl_token_2022_pod_PodMint.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMint".
    
    (* Clone *)
    Definition clone (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (|
            M.match_operator (|
              Value.DeclaredButUndefined,
              [
                fun γ =>
                  ltac:(M.monadic
                    (M.match_operator (|
                      Value.DeclaredButUndefined,
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (M.match_operator (|
                              Value.DeclaredButUndefined,
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (M.match_operator (|
                                      Value.DeclaredButUndefined,
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (M.match_operator (|
                                              Value.DeclaredButUndefined,
                                              [ fun γ => ltac:(M.monadic (M.read (| self |))) ]
                                            |)))
                                      ]
                                    |)))
                              ]
                            |)))
                      ]
                    |)))
              ]
            |)
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_spl_token_2022_pod_PodMint.
  
  Module Impl_core_marker_Copy_for_spl_token_2022_pod_PodMint.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMint".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_spl_token_2022_pod_PodMint.
  
  Module Impl_core_fmt_Debug_for_spl_token_2022_pod_PodMint.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMint".
    
    (* Debug *)
    Definition fmt (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::Formatter",
              "debug_struct_field5_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "PodMint" |);
              M.read (| Value.String "mint_authority" |);
              (* Unsize *)
              M.pointer_coercion
                (M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "spl_token_2022::pod::PodMint",
                  "mint_authority"
                |));
              M.read (| Value.String "supply" |);
              (* Unsize *)
              M.pointer_coercion
                (M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "spl_token_2022::pod::PodMint",
                  "supply"
                |));
              M.read (| Value.String "decimals" |);
              (* Unsize *)
              M.pointer_coercion
                (M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "spl_token_2022::pod::PodMint",
                  "decimals"
                |));
              M.read (| Value.String "is_initialized" |);
              (* Unsize *)
              M.pointer_coercion
                (M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "spl_token_2022::pod::PodMint",
                  "is_initialized"
                |));
              M.read (| Value.String "freeze_authority" |);
              (* Unsize *)
              M.pointer_coercion
                (M.alloc (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "spl_token_2022::pod::PodMint",
                    "freeze_authority"
                  |)
                |))
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_spl_token_2022_pod_PodMint.
  
  Module Impl_core_default_Default_for_spl_token_2022_pod_PodMint.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMint".
    
    (* Default *)
    Definition default (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [] =>
        ltac:(M.monadic
          (Value.StructRecord
            "spl_token_2022::pod::PodMint"
            [
              ("mint_authority",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.apply
                      (Ty.path "spl_token_2022::pod::PodCOption")
                      [ Ty.path "solana_program::pubkey::Pubkey" ],
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("supply",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "spl_pod::primitives::PodU64",
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("decimals",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "u8",
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("is_initialized",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "spl_pod::primitives::PodBool",
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("freeze_authority",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.apply
                      (Ty.path "spl_token_2022::pod::PodCOption")
                      [ Ty.path "solana_program::pubkey::Pubkey" ],
                    [],
                    "default",
                    []
                  |),
                  []
                |))
            ]))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::default::Default"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("default", InstanceField.Method default) ].
  End Impl_core_default_Default_for_spl_token_2022_pod_PodMint.
  
  Module Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_PodMint.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMint".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_PodMint.
  
  Module Impl_core_cmp_PartialEq_for_spl_token_2022_pod_PodMint.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMint".
    
    (* PartialEq *)
    Definition eq (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self; other ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let other := M.alloc (| other |) in
          LogicalOp.and (|
            LogicalOp.and (|
              LogicalOp.and (|
                LogicalOp.and (|
                  M.call_closure (|
                    M.get_trait_method (|
                      "core::cmp::PartialEq",
                      Ty.apply
                        (Ty.path "spl_token_2022::pod::PodCOption")
                        [ Ty.path "solana_program::pubkey::Pubkey" ],
                      [
                        Ty.apply
                          (Ty.path "spl_token_2022::pod::PodCOption")
                          [ Ty.path "solana_program::pubkey::Pubkey" ]
                      ],
                      "eq",
                      []
                    |),
                    [
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "spl_token_2022::pod::PodMint",
                        "mint_authority"
                      |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| other |),
                        "spl_token_2022::pod::PodMint",
                        "mint_authority"
                      |)
                    ]
                  |),
                  ltac:(M.monadic
                    (M.call_closure (|
                      M.get_trait_method (|
                        "core::cmp::PartialEq",
                        Ty.path "spl_pod::primitives::PodU64",
                        [ Ty.path "spl_pod::primitives::PodU64" ],
                        "eq",
                        []
                      |),
                      [
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "spl_token_2022::pod::PodMint",
                          "supply"
                        |);
                        M.SubPointer.get_struct_record_field (|
                          M.read (| other |),
                          "spl_token_2022::pod::PodMint",
                          "supply"
                        |)
                      ]
                    |)))
                |),
                ltac:(M.monadic
                  (BinOp.Pure.eq
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "spl_token_2022::pod::PodMint",
                        "decimals"
                      |)
                    |))
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| other |),
                        "spl_token_2022::pod::PodMint",
                        "decimals"
                      |)
                    |))))
              |),
              ltac:(M.monadic
                (M.call_closure (|
                  M.get_trait_method (|
                    "core::cmp::PartialEq",
                    Ty.path "spl_pod::primitives::PodBool",
                    [ Ty.path "spl_pod::primitives::PodBool" ],
                    "eq",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "spl_token_2022::pod::PodMint",
                      "is_initialized"
                    |);
                    M.SubPointer.get_struct_record_field (|
                      M.read (| other |),
                      "spl_token_2022::pod::PodMint",
                      "is_initialized"
                    |)
                  ]
                |)))
            |),
            ltac:(M.monadic
              (M.call_closure (|
                M.get_trait_method (|
                  "core::cmp::PartialEq",
                  Ty.apply
                    (Ty.path "spl_token_2022::pod::PodCOption")
                    [ Ty.path "solana_program::pubkey::Pubkey" ],
                  [
                    Ty.apply
                      (Ty.path "spl_token_2022::pod::PodCOption")
                      [ Ty.path "solana_program::pubkey::Pubkey" ]
                  ],
                  "eq",
                  []
                |),
                [
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "spl_token_2022::pod::PodMint",
                    "freeze_authority"
                  |);
                  M.SubPointer.get_struct_record_field (|
                    M.read (| other |),
                    "spl_token_2022::pod::PodMint",
                    "freeze_authority"
                  |)
                ]
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::PartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("eq", InstanceField.Method eq) ].
  End Impl_core_cmp_PartialEq_for_spl_token_2022_pod_PodMint.
  
  Module Impl_bytemuck_pod_Pod_for_spl_token_2022_pod_PodMint.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMint".
    
    Axiom Implements :
      M.IsTraitInstance
        "bytemuck::pod::Pod"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_pod_Pod_for_spl_token_2022_pod_PodMint.
  
  Module Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_pod_PodMint.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMint".
    
    Axiom Implements :
      M.IsTraitInstance
        "bytemuck::zeroable::Zeroable"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_pod_PodMint.
  
  Module Impl_solana_program_program_pack_IsInitialized_for_spl_token_2022_pod_PodMint.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMint".
    
    (*
        fn is_initialized(&self) -> bool {
            self.is_initialized.into()
        }
    *)
    Definition is_initialized (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::convert::Into",
              Ty.path "spl_pod::primitives::PodBool",
              [ Ty.path "bool" ],
              "into",
              []
            |),
            [
              M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "spl_token_2022::pod::PodMint",
                  "is_initialized"
                |)
              |)
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "solana_program::program_pack::IsInitialized"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("is_initialized", InstanceField.Method is_initialized) ].
  End Impl_solana_program_program_pack_IsInitialized_for_spl_token_2022_pod_PodMint.
  
  Module Impl_spl_token_2022_state_PackedSizeOf_for_spl_token_2022_pod_PodMint.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMint".
    
    (*     const SIZE_OF: usize = pod_get_packed_len::<Self>(); *)
    (* Ty.path "usize" *)
    Definition value_SIZE_OF : Value.t :=
      M.run
        ltac:(M.monadic
          (M.alloc (|
            M.call_closure (|
              M.get_function (|
                "spl_pod::bytemuck::pod_get_packed_len",
                [ Ty.path "spl_token_2022::pod::PodMint" ]
              |),
              []
            |)
          |))).
    
    Axiom Implements :
      M.IsTraitInstance
        "spl_token_2022::state::PackedSizeOf"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("value_SIZE_OF", InstanceField.Constant value_SIZE_OF) ].
  End Impl_spl_token_2022_state_PackedSizeOf_for_spl_token_2022_pod_PodMint.
  
  (* StructRecord
    {
      name := "PodAccount";
      ty_params := [];
      fields :=
        [
          ("mint", Ty.path "solana_program::pubkey::Pubkey");
          ("owner", Ty.path "solana_program::pubkey::Pubkey");
          ("amount", Ty.path "spl_pod::primitives::PodU64");
          ("delegate",
            Ty.apply
              (Ty.path "spl_token_2022::pod::PodCOption")
              [ Ty.path "solana_program::pubkey::Pubkey" ]);
          ("state", Ty.path "u8");
          ("is_native",
            Ty.apply
              (Ty.path "spl_token_2022::pod::PodCOption")
              [ Ty.path "spl_pod::primitives::PodU64" ]);
          ("delegated_amount", Ty.path "spl_pod::primitives::PodU64");
          ("close_authority",
            Ty.apply
              (Ty.path "spl_token_2022::pod::PodCOption")
              [ Ty.path "solana_program::pubkey::Pubkey" ])
        ];
    } *)
  
  Module Impl_core_clone_Clone_for_spl_token_2022_pod_PodAccount.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodAccount".
    
    (* Clone *)
    Definition clone (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (|
            M.match_operator (|
              Value.DeclaredButUndefined,
              [
                fun γ =>
                  ltac:(M.monadic
                    (M.match_operator (|
                      Value.DeclaredButUndefined,
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (M.match_operator (|
                              Value.DeclaredButUndefined,
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (M.match_operator (|
                                      Value.DeclaredButUndefined,
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (M.match_operator (|
                                              Value.DeclaredButUndefined,
                                              [
                                                fun γ =>
                                                  ltac:(M.monadic
                                                    (M.match_operator (|
                                                      Value.DeclaredButUndefined,
                                                      [
                                                        fun γ =>
                                                          ltac:(M.monadic (M.read (| self |)))
                                                      ]
                                                    |)))
                                              ]
                                            |)))
                                      ]
                                    |)))
                              ]
                            |)))
                      ]
                    |)))
              ]
            |)
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_spl_token_2022_pod_PodAccount.
  
  Module Impl_core_marker_Copy_for_spl_token_2022_pod_PodAccount.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodAccount".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_spl_token_2022_pod_PodAccount.
  
  Module Impl_core_fmt_Debug_for_spl_token_2022_pod_PodAccount.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodAccount".
    
    (* Debug *)
    Definition fmt (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.read (|
            let names :=
              M.alloc (|
                M.alloc (|
                  Value.Array
                    [
                      M.read (| Value.String "mint" |);
                      M.read (| Value.String "owner" |);
                      M.read (| Value.String "amount" |);
                      M.read (| Value.String "delegate" |);
                      M.read (| Value.String "state" |);
                      M.read (| Value.String "is_native" |);
                      M.read (| Value.String "delegated_amount" |);
                      M.read (| Value.String "close_authority" |)
                    ]
                |)
              |) in
            let values :=
              M.alloc (|
                (* Unsize *)
                M.pointer_coercion
                  (M.alloc (|
                    Value.Array
                      [
                        (* Unsize *)
                        M.pointer_coercion
                          (M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "spl_token_2022::pod::PodAccount",
                            "mint"
                          |));
                        (* Unsize *)
                        M.pointer_coercion
                          (M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "spl_token_2022::pod::PodAccount",
                            "owner"
                          |));
                        (* Unsize *)
                        M.pointer_coercion
                          (M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "spl_token_2022::pod::PodAccount",
                            "amount"
                          |));
                        (* Unsize *)
                        M.pointer_coercion
                          (M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "spl_token_2022::pod::PodAccount",
                            "delegate"
                          |));
                        (* Unsize *)
                        M.pointer_coercion
                          (M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "spl_token_2022::pod::PodAccount",
                            "state"
                          |));
                        (* Unsize *)
                        M.pointer_coercion
                          (M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "spl_token_2022::pod::PodAccount",
                            "is_native"
                          |));
                        (* Unsize *)
                        M.pointer_coercion
                          (M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "spl_token_2022::pod::PodAccount",
                            "delegated_amount"
                          |));
                        (* Unsize *)
                        M.pointer_coercion
                          (M.alloc (|
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "spl_token_2022::pod::PodAccount",
                              "close_authority"
                            |)
                          |))
                      ]
                  |))
              |) in
            M.alloc (|
              M.call_closure (|
                M.get_associated_function (|
                  Ty.path "core::fmt::Formatter",
                  "debug_struct_fields_finish",
                  []
                |),
                [
                  M.read (| f |);
                  M.read (| Value.String "PodAccount" |);
                  (* Unsize *) M.pointer_coercion (M.read (| names |));
                  M.read (| values |)
                ]
              |)
            |)
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_spl_token_2022_pod_PodAccount.
  
  Module Impl_core_default_Default_for_spl_token_2022_pod_PodAccount.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodAccount".
    
    (* Default *)
    Definition default (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [] =>
        ltac:(M.monadic
          (Value.StructRecord
            "spl_token_2022::pod::PodAccount"
            [
              ("mint",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "solana_program::pubkey::Pubkey",
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("owner",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "solana_program::pubkey::Pubkey",
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("amount",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "spl_pod::primitives::PodU64",
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("delegate",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.apply
                      (Ty.path "spl_token_2022::pod::PodCOption")
                      [ Ty.path "solana_program::pubkey::Pubkey" ],
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("state",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "u8",
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("is_native",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.apply
                      (Ty.path "spl_token_2022::pod::PodCOption")
                      [ Ty.path "spl_pod::primitives::PodU64" ],
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("delegated_amount",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "spl_pod::primitives::PodU64",
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("close_authority",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.apply
                      (Ty.path "spl_token_2022::pod::PodCOption")
                      [ Ty.path "solana_program::pubkey::Pubkey" ],
                    [],
                    "default",
                    []
                  |),
                  []
                |))
            ]))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::default::Default"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("default", InstanceField.Method default) ].
  End Impl_core_default_Default_for_spl_token_2022_pod_PodAccount.
  
  Module Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_PodAccount.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodAccount".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_PodAccount.
  
  Module Impl_core_cmp_PartialEq_for_spl_token_2022_pod_PodAccount.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodAccount".
    
    (* PartialEq *)
    Definition eq (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self; other ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let other := M.alloc (| other |) in
          LogicalOp.and (|
            LogicalOp.and (|
              LogicalOp.and (|
                LogicalOp.and (|
                  LogicalOp.and (|
                    LogicalOp.and (|
                      LogicalOp.and (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::cmp::PartialEq",
                            Ty.path "solana_program::pubkey::Pubkey",
                            [ Ty.path "solana_program::pubkey::Pubkey" ],
                            "eq",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "spl_token_2022::pod::PodAccount",
                              "mint"
                            |);
                            M.SubPointer.get_struct_record_field (|
                              M.read (| other |),
                              "spl_token_2022::pod::PodAccount",
                              "mint"
                            |)
                          ]
                        |),
                        ltac:(M.monadic
                          (M.call_closure (|
                            M.get_trait_method (|
                              "core::cmp::PartialEq",
                              Ty.path "solana_program::pubkey::Pubkey",
                              [ Ty.path "solana_program::pubkey::Pubkey" ],
                              "eq",
                              []
                            |),
                            [
                              M.SubPointer.get_struct_record_field (|
                                M.read (| self |),
                                "spl_token_2022::pod::PodAccount",
                                "owner"
                              |);
                              M.SubPointer.get_struct_record_field (|
                                M.read (| other |),
                                "spl_token_2022::pod::PodAccount",
                                "owner"
                              |)
                            ]
                          |)))
                      |),
                      ltac:(M.monadic
                        (M.call_closure (|
                          M.get_trait_method (|
                            "core::cmp::PartialEq",
                            Ty.path "spl_pod::primitives::PodU64",
                            [ Ty.path "spl_pod::primitives::PodU64" ],
                            "eq",
                            []
                          |),
                          [
                            M.SubPointer.get_struct_record_field (|
                              M.read (| self |),
                              "spl_token_2022::pod::PodAccount",
                              "amount"
                            |);
                            M.SubPointer.get_struct_record_field (|
                              M.read (| other |),
                              "spl_token_2022::pod::PodAccount",
                              "amount"
                            |)
                          ]
                        |)))
                    |),
                    ltac:(M.monadic
                      (M.call_closure (|
                        M.get_trait_method (|
                          "core::cmp::PartialEq",
                          Ty.apply
                            (Ty.path "spl_token_2022::pod::PodCOption")
                            [ Ty.path "solana_program::pubkey::Pubkey" ],
                          [
                            Ty.apply
                              (Ty.path "spl_token_2022::pod::PodCOption")
                              [ Ty.path "solana_program::pubkey::Pubkey" ]
                          ],
                          "eq",
                          []
                        |),
                        [
                          M.SubPointer.get_struct_record_field (|
                            M.read (| self |),
                            "spl_token_2022::pod::PodAccount",
                            "delegate"
                          |);
                          M.SubPointer.get_struct_record_field (|
                            M.read (| other |),
                            "spl_token_2022::pod::PodAccount",
                            "delegate"
                          |)
                        ]
                      |)))
                  |),
                  ltac:(M.monadic
                    (BinOp.Pure.eq
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| self |),
                          "spl_token_2022::pod::PodAccount",
                          "state"
                        |)
                      |))
                      (M.read (|
                        M.SubPointer.get_struct_record_field (|
                          M.read (| other |),
                          "spl_token_2022::pod::PodAccount",
                          "state"
                        |)
                      |))))
                |),
                ltac:(M.monadic
                  (M.call_closure (|
                    M.get_trait_method (|
                      "core::cmp::PartialEq",
                      Ty.apply
                        (Ty.path "spl_token_2022::pod::PodCOption")
                        [ Ty.path "spl_pod::primitives::PodU64" ],
                      [
                        Ty.apply
                          (Ty.path "spl_token_2022::pod::PodCOption")
                          [ Ty.path "spl_pod::primitives::PodU64" ]
                      ],
                      "eq",
                      []
                    |),
                    [
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "spl_token_2022::pod::PodAccount",
                        "is_native"
                      |);
                      M.SubPointer.get_struct_record_field (|
                        M.read (| other |),
                        "spl_token_2022::pod::PodAccount",
                        "is_native"
                      |)
                    ]
                  |)))
              |),
              ltac:(M.monadic
                (M.call_closure (|
                  M.get_trait_method (|
                    "core::cmp::PartialEq",
                    Ty.path "spl_pod::primitives::PodU64",
                    [ Ty.path "spl_pod::primitives::PodU64" ],
                    "eq",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "spl_token_2022::pod::PodAccount",
                      "delegated_amount"
                    |);
                    M.SubPointer.get_struct_record_field (|
                      M.read (| other |),
                      "spl_token_2022::pod::PodAccount",
                      "delegated_amount"
                    |)
                  ]
                |)))
            |),
            ltac:(M.monadic
              (M.call_closure (|
                M.get_trait_method (|
                  "core::cmp::PartialEq",
                  Ty.apply
                    (Ty.path "spl_token_2022::pod::PodCOption")
                    [ Ty.path "solana_program::pubkey::Pubkey" ],
                  [
                    Ty.apply
                      (Ty.path "spl_token_2022::pod::PodCOption")
                      [ Ty.path "solana_program::pubkey::Pubkey" ]
                  ],
                  "eq",
                  []
                |),
                [
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "spl_token_2022::pod::PodAccount",
                    "close_authority"
                  |);
                  M.SubPointer.get_struct_record_field (|
                    M.read (| other |),
                    "spl_token_2022::pod::PodAccount",
                    "close_authority"
                  |)
                ]
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::PartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("eq", InstanceField.Method eq) ].
  End Impl_core_cmp_PartialEq_for_spl_token_2022_pod_PodAccount.
  
  Module Impl_bytemuck_pod_Pod_for_spl_token_2022_pod_PodAccount.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodAccount".
    
    Axiom Implements :
      M.IsTraitInstance
        "bytemuck::pod::Pod"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_pod_Pod_for_spl_token_2022_pod_PodAccount.
  
  Module Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_pod_PodAccount.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodAccount".
    
    Axiom Implements :
      M.IsTraitInstance
        "bytemuck::zeroable::Zeroable"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_pod_PodAccount.
  
  Module Impl_spl_token_2022_pod_PodAccount.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodAccount".
    
    (*
        pub fn is_frozen(&self) -> bool {
            self.state == AccountState::Frozen as u8
        }
    *)
    Definition is_frozen (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          BinOp.Pure.eq
            (M.read (|
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "spl_token_2022::pod::PodAccount",
                "state"
              |)
            |))
            (M.rust_cast (Value.Integer 2))))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_is_frozen : M.IsAssociatedFunction Self "is_frozen" is_frozen.
    
    (*
        pub fn is_native(&self) -> bool {
            self.is_native.is_some()
        }
    *)
    Definition is_native (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.apply
                (Ty.path "spl_token_2022::pod::PodCOption")
                [ Ty.path "spl_pod::primitives::PodU64" ],
              "is_some",
              []
            |),
            [
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "spl_token_2022::pod::PodAccount",
                "is_native"
              |)
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_is_native : M.IsAssociatedFunction Self "is_native" is_native.
    
    (*
        pub fn is_owned_by_system_program_or_incinerator(&self) -> bool {
            solana_program::system_program::check_id(&self.owner)
                || solana_program::incinerator::check_id(&self.owner)
        }
    *)
    Definition is_owned_by_system_program_or_incinerator (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          LogicalOp.or (|
            M.call_closure (|
              M.get_function (| "solana_program::system_program::check_id", [] |),
              [
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "spl_token_2022::pod::PodAccount",
                  "owner"
                |)
              ]
            |),
            ltac:(M.monadic
              (M.call_closure (|
                M.get_function (| "solana_program::incinerator::check_id", [] |),
                [
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "spl_token_2022::pod::PodAccount",
                    "owner"
                  |)
                ]
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_is_owned_by_system_program_or_incinerator :
      M.IsAssociatedFunction
        Self
        "is_owned_by_system_program_or_incinerator"
        is_owned_by_system_program_or_incinerator.
  End Impl_spl_token_2022_pod_PodAccount.
  
  Module Impl_solana_program_program_pack_IsInitialized_for_spl_token_2022_pod_PodAccount.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodAccount".
    
    (*
        fn is_initialized(&self) -> bool {
            self.state != 0
        }
    *)
    Definition is_initialized (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          BinOp.Pure.ne
            (M.read (|
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "spl_token_2022::pod::PodAccount",
                "state"
              |)
            |))
            (Value.Integer 0)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "solana_program::program_pack::IsInitialized"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("is_initialized", InstanceField.Method is_initialized) ].
  End Impl_solana_program_program_pack_IsInitialized_for_spl_token_2022_pod_PodAccount.
  
  Module Impl_spl_token_2022_state_PackedSizeOf_for_spl_token_2022_pod_PodAccount.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodAccount".
    
    (*     const SIZE_OF: usize = pod_get_packed_len::<Self>(); *)
    (* Ty.path "usize" *)
    Definition value_SIZE_OF : Value.t :=
      M.run
        ltac:(M.monadic
          (M.alloc (|
            M.call_closure (|
              M.get_function (|
                "spl_pod::bytemuck::pod_get_packed_len",
                [ Ty.path "spl_token_2022::pod::PodAccount" ]
              |),
              []
            |)
          |))).
    
    Axiom Implements :
      M.IsTraitInstance
        "spl_token_2022::state::PackedSizeOf"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("value_SIZE_OF", InstanceField.Constant value_SIZE_OF) ].
  End Impl_spl_token_2022_state_PackedSizeOf_for_spl_token_2022_pod_PodAccount.
  
  (* StructRecord
    {
      name := "PodMultisig";
      ty_params := [];
      fields :=
        [
          ("m", Ty.path "u8");
          ("n", Ty.path "u8");
          ("is_initialized", Ty.path "spl_pod::primitives::PodBool");
          ("signers", Ty.apply (Ty.path "array") [ Ty.path "solana_program::pubkey::Pubkey" ])
        ];
    } *)
  
  Module Impl_core_clone_Clone_for_spl_token_2022_pod_PodMultisig.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMultisig".
    
    (* Clone *)
    Definition clone (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.read (|
            M.match_operator (|
              Value.DeclaredButUndefined,
              [
                fun γ =>
                  ltac:(M.monadic
                    (M.match_operator (|
                      Value.DeclaredButUndefined,
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (M.match_operator (|
                              Value.DeclaredButUndefined,
                              [ fun γ => ltac:(M.monadic (M.read (| self |))) ]
                            |)))
                      ]
                    |)))
              ]
            |)
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::clone::Clone"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method clone) ].
  End Impl_core_clone_Clone_for_spl_token_2022_pod_PodMultisig.
  
  Module Impl_core_marker_Copy_for_spl_token_2022_pod_PodMultisig.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMultisig".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::Copy"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_for_spl_token_2022_pod_PodMultisig.
  
  Module Impl_core_fmt_Debug_for_spl_token_2022_pod_PodMultisig.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMultisig".
    
    (* Debug *)
    Definition fmt (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self; f ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let f := M.alloc (| f |) in
          M.call_closure (|
            M.get_associated_function (|
              Ty.path "core::fmt::Formatter",
              "debug_struct_field4_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "PodMultisig" |);
              M.read (| Value.String "m" |);
              (* Unsize *)
              M.pointer_coercion
                (M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "spl_token_2022::pod::PodMultisig",
                  "m"
                |));
              M.read (| Value.String "n" |);
              (* Unsize *)
              M.pointer_coercion
                (M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "spl_token_2022::pod::PodMultisig",
                  "n"
                |));
              M.read (| Value.String "is_initialized" |);
              (* Unsize *)
              M.pointer_coercion
                (M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "spl_token_2022::pod::PodMultisig",
                  "is_initialized"
                |));
              M.read (| Value.String "signers" |);
              (* Unsize *)
              M.pointer_coercion
                (M.alloc (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "spl_token_2022::pod::PodMultisig",
                    "signers"
                  |)
                |))
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::fmt::Debug"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method fmt) ].
  End Impl_core_fmt_Debug_for_spl_token_2022_pod_PodMultisig.
  
  Module Impl_core_default_Default_for_spl_token_2022_pod_PodMultisig.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMultisig".
    
    (* Default *)
    Definition default (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [] =>
        ltac:(M.monadic
          (Value.StructRecord
            "spl_token_2022::pod::PodMultisig"
            [
              ("m",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "u8",
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("n",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "u8",
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("is_initialized",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.path "spl_pod::primitives::PodBool",
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("signers",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.apply (Ty.path "array") [ Ty.path "solana_program::pubkey::Pubkey" ],
                    [],
                    "default",
                    []
                  |),
                  []
                |))
            ]))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::default::Default"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("default", InstanceField.Method default) ].
  End Impl_core_default_Default_for_spl_token_2022_pod_PodMultisig.
  
  Module Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_PodMultisig.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMultisig".
    
    Axiom Implements :
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_for_spl_token_2022_pod_PodMultisig.
  
  Module Impl_core_cmp_PartialEq_for_spl_token_2022_pod_PodMultisig.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMultisig".
    
    (* PartialEq *)
    Definition eq (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self; other ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let other := M.alloc (| other |) in
          LogicalOp.and (|
            LogicalOp.and (|
              LogicalOp.and (|
                BinOp.Pure.eq
                  (M.read (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "spl_token_2022::pod::PodMultisig",
                      "m"
                    |)
                  |))
                  (M.read (|
                    M.SubPointer.get_struct_record_field (|
                      M.read (| other |),
                      "spl_token_2022::pod::PodMultisig",
                      "m"
                    |)
                  |)),
                ltac:(M.monadic
                  (BinOp.Pure.eq
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| self |),
                        "spl_token_2022::pod::PodMultisig",
                        "n"
                      |)
                    |))
                    (M.read (|
                      M.SubPointer.get_struct_record_field (|
                        M.read (| other |),
                        "spl_token_2022::pod::PodMultisig",
                        "n"
                      |)
                    |))))
              |),
              ltac:(M.monadic
                (M.call_closure (|
                  M.get_trait_method (|
                    "core::cmp::PartialEq",
                    Ty.path "spl_pod::primitives::PodBool",
                    [ Ty.path "spl_pod::primitives::PodBool" ],
                    "eq",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "spl_token_2022::pod::PodMultisig",
                      "is_initialized"
                    |);
                    M.SubPointer.get_struct_record_field (|
                      M.read (| other |),
                      "spl_token_2022::pod::PodMultisig",
                      "is_initialized"
                    |)
                  ]
                |)))
            |),
            ltac:(M.monadic
              (M.call_closure (|
                M.get_trait_method (|
                  "core::cmp::PartialEq",
                  Ty.apply (Ty.path "array") [ Ty.path "solana_program::pubkey::Pubkey" ],
                  [ Ty.apply (Ty.path "array") [ Ty.path "solana_program::pubkey::Pubkey" ] ],
                  "eq",
                  []
                |),
                [
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "spl_token_2022::pod::PodMultisig",
                    "signers"
                  |);
                  M.SubPointer.get_struct_record_field (|
                    M.read (| other |),
                    "spl_token_2022::pod::PodMultisig",
                    "signers"
                  |)
                ]
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::cmp::PartialEq"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("eq", InstanceField.Method eq) ].
  End Impl_core_cmp_PartialEq_for_spl_token_2022_pod_PodMultisig.
  
  Module Impl_bytemuck_pod_Pod_for_spl_token_2022_pod_PodMultisig.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMultisig".
    
    Axiom Implements :
      M.IsTraitInstance
        "bytemuck::pod::Pod"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_pod_Pod_for_spl_token_2022_pod_PodMultisig.
  
  Module Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_pod_PodMultisig.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMultisig".
    
    Axiom Implements :
      M.IsTraitInstance
        "bytemuck::zeroable::Zeroable"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_zeroable_Zeroable_for_spl_token_2022_pod_PodMultisig.
  
  Module Impl_solana_program_program_pack_IsInitialized_for_spl_token_2022_pod_PodMultisig.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMultisig".
    
    (*
        fn is_initialized(&self) -> bool {
            self.is_initialized.into()
        }
    *)
    Definition is_initialized (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::convert::Into",
              Ty.path "spl_pod::primitives::PodBool",
              [ Ty.path "bool" ],
              "into",
              []
            |),
            [
              M.read (|
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "spl_token_2022::pod::PodMultisig",
                  "is_initialized"
                |)
              |)
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "solana_program::program_pack::IsInitialized"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("is_initialized", InstanceField.Method is_initialized) ].
  End Impl_solana_program_program_pack_IsInitialized_for_spl_token_2022_pod_PodMultisig.
  
  Module Impl_spl_token_2022_state_PackedSizeOf_for_spl_token_2022_pod_PodMultisig.
    Definition Self : Ty.t := Ty.path "spl_token_2022::pod::PodMultisig".
    
    (*     const SIZE_OF: usize = pod_get_packed_len::<Self>(); *)
    (* Ty.path "usize" *)
    Definition value_SIZE_OF : Value.t :=
      M.run
        ltac:(M.monadic
          (M.alloc (|
            M.call_closure (|
              M.get_function (|
                "spl_pod::bytemuck::pod_get_packed_len",
                [ Ty.path "spl_token_2022::pod::PodMultisig" ]
              |),
              []
            |)
          |))).
    
    Axiom Implements :
      M.IsTraitInstance
        "spl_token_2022::state::PackedSizeOf"
        Self
        (* Trait polymorphic types *) []
        (* Instance *) [ ("value_SIZE_OF", InstanceField.Constant value_SIZE_OF) ].
  End Impl_spl_token_2022_state_PackedSizeOf_for_spl_token_2022_pod_PodMultisig.
  
  (* StructRecord
    {
      name := "PodCOption";
      ty_params := [ "T" ];
      fields := [ ("option", Ty.apply (Ty.path "array") [ Ty.path "u8" ]); ("value", T) ];
    } *)
  
  Module Impl_core_clone_Clone_where_core_clone_Clone_T_where_core_marker_Copy_T_where_bytemuck_pod_Pod_T_where_core_default_Default_T_for_spl_token_2022_pod_PodCOption_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "spl_token_2022::pod::PodCOption") [ T ].
    
    (* Clone *)
    Definition clone (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match τ, α with
      | [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          Value.StructRecord
            "spl_token_2022::pod::PodCOption"
            [
              ("option",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::clone::Clone",
                    Ty.apply (Ty.path "array") [ Ty.path "u8" ],
                    [],
                    "clone",
                    []
                  |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "spl_token_2022::pod::PodCOption",
                      "option"
                    |)
                  ]
                |));
              ("value",
                M.call_closure (|
                  M.get_trait_method (| "core::clone::Clone", T, [], "clone", [] |),
                  [
                    M.SubPointer.get_struct_record_field (|
                      M.read (| self |),
                      "spl_token_2022::pod::PodCOption",
                      "value"
                    |)
                  ]
                |))
            ]))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::clone::Clone"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("clone", InstanceField.Method (clone T)) ].
  End Impl_core_clone_Clone_where_core_clone_Clone_T_where_core_marker_Copy_T_where_bytemuck_pod_Pod_T_where_core_default_Default_T_for_spl_token_2022_pod_PodCOption_T.
  
  Module Impl_core_marker_Copy_where_core_marker_Copy_T_where_bytemuck_pod_Pod_T_where_core_default_Default_T_for_spl_token_2022_pod_PodCOption_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "spl_token_2022::pod::PodCOption") [ T ].
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::marker::Copy"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_Copy_where_core_marker_Copy_T_where_bytemuck_pod_Pod_T_where_core_default_Default_T_for_spl_token_2022_pod_PodCOption_T.
  
  Module Impl_core_fmt_Debug_where_core_fmt_Debug_T_where_core_marker_Copy_T_where_bytemuck_pod_Pod_T_where_core_default_Default_T_for_spl_token_2022_pod_PodCOption_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "spl_token_2022::pod::PodCOption") [ T ].
    
    (* Debug *)
    Definition fmt (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T 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::Formatter",
              "debug_struct_field2_finish",
              []
            |),
            [
              M.read (| f |);
              M.read (| Value.String "PodCOption" |);
              M.read (| Value.String "option" |);
              (* Unsize *)
              M.pointer_coercion
                (M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "spl_token_2022::pod::PodCOption",
                  "option"
                |));
              M.read (| Value.String "value" |);
              (* Unsize *)
              M.pointer_coercion
                (M.alloc (|
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "spl_token_2022::pod::PodCOption",
                    "value"
                  |)
                |))
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::fmt::Debug"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("fmt", InstanceField.Method (fmt T)) ].
  End Impl_core_fmt_Debug_where_core_fmt_Debug_T_where_core_marker_Copy_T_where_bytemuck_pod_Pod_T_where_core_default_Default_T_for_spl_token_2022_pod_PodCOption_T.
  
  Module Impl_core_default_Default_where_core_default_Default_T_where_bytemuck_pod_Pod_T_where_core_default_Default_T_for_spl_token_2022_pod_PodCOption_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "spl_token_2022::pod::PodCOption") [ T ].
    
    (* Default *)
    Definition default (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match τ, α with
      | [], [] =>
        ltac:(M.monadic
          (Value.StructRecord
            "spl_token_2022::pod::PodCOption"
            [
              ("option",
                M.call_closure (|
                  M.get_trait_method (|
                    "core::default::Default",
                    Ty.apply (Ty.path "array") [ Ty.path "u8" ],
                    [],
                    "default",
                    []
                  |),
                  []
                |));
              ("value",
                M.call_closure (|
                  M.get_trait_method (| "core::default::Default", T, [], "default", [] |),
                  []
                |))
            ]))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::default::Default"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("default", InstanceField.Method (default T)) ].
  End Impl_core_default_Default_where_core_default_Default_T_where_bytemuck_pod_Pod_T_where_core_default_Default_T_for_spl_token_2022_pod_PodCOption_T.
  
  Module Impl_core_marker_StructuralPartialEq_where_bytemuck_pod_Pod_T_where_core_default_Default_T_for_spl_token_2022_pod_PodCOption_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "spl_token_2022::pod::PodCOption") [ T ].
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::marker::StructuralPartialEq"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_core_marker_StructuralPartialEq_where_bytemuck_pod_Pod_T_where_core_default_Default_T_for_spl_token_2022_pod_PodCOption_T.
  
  Module Impl_core_cmp_PartialEq_where_core_cmp_PartialEq_T_where_core_marker_Copy_T_where_bytemuck_pod_Pod_T_where_core_default_Default_T_for_spl_token_2022_pod_PodCOption_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "spl_token_2022::pod::PodCOption") [ T ].
    
    (* PartialEq *)
    Definition eq (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match τ, α with
      | [], [ self; other ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let other := M.alloc (| other |) in
          LogicalOp.and (|
            M.call_closure (|
              M.get_trait_method (|
                "core::cmp::PartialEq",
                Ty.apply (Ty.path "array") [ Ty.path "u8" ],
                [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ],
                "eq",
                []
              |),
              [
                M.SubPointer.get_struct_record_field (|
                  M.read (| self |),
                  "spl_token_2022::pod::PodCOption",
                  "option"
                |);
                M.SubPointer.get_struct_record_field (|
                  M.read (| other |),
                  "spl_token_2022::pod::PodCOption",
                  "option"
                |)
              ]
            |),
            ltac:(M.monadic
              (M.call_closure (|
                M.get_trait_method (| "core::cmp::PartialEq", T, [ T ], "eq", [] |),
                [
                  M.SubPointer.get_struct_record_field (|
                    M.read (| self |),
                    "spl_token_2022::pod::PodCOption",
                    "value"
                  |);
                  M.SubPointer.get_struct_record_field (|
                    M.read (| other |),
                    "spl_token_2022::pod::PodCOption",
                    "value"
                  |)
                ]
              |)))
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::cmp::PartialEq"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [ ("eq", InstanceField.Method (eq T)) ].
  End Impl_core_cmp_PartialEq_where_core_cmp_PartialEq_T_where_core_marker_Copy_T_where_bytemuck_pod_Pod_T_where_core_default_Default_T_for_spl_token_2022_pod_PodCOption_T.
  
  Module Impl_bytemuck_pod_Pod_where_bytemuck_pod_Pod_T_where_core_default_Default_T_where_bytemuck_pod_Pod_T_for_spl_token_2022_pod_PodCOption_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "spl_token_2022::pod::PodCOption") [ T ].
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "bytemuck::pod::Pod"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_pod_Pod_where_bytemuck_pod_Pod_T_where_core_default_Default_T_where_bytemuck_pod_Pod_T_for_spl_token_2022_pod_PodCOption_T.
  
  Module Impl_bytemuck_zeroable_Zeroable_where_bytemuck_pod_Pod_T_where_core_default_Default_T_where_bytemuck_zeroable_Zeroable_T_for_spl_token_2022_pod_PodCOption_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "spl_token_2022::pod::PodCOption") [ T ].
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "bytemuck::zeroable::Zeroable"
        (Self T)
        (* Trait polymorphic types *) []
        (* Instance *) [].
  End Impl_bytemuck_zeroable_Zeroable_where_bytemuck_pod_Pod_T_where_core_default_Default_T_where_bytemuck_zeroable_Zeroable_T_for_spl_token_2022_pod_PodCOption_T.
  
  Module Impl_spl_token_2022_pod_PodCOption_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "spl_token_2022::pod::PodCOption") [ T ].
    
    (*     pub const NONE: [u8; 4] = [0; 4]; *)
    (* Ty.apply (Ty.path "array") [ Ty.path "u8" ] *)
    Definition value_NONE (T : Ty.t) : Value.t :=
      let Self : Ty.t := Self T in
      M.run ltac:(M.monadic (M.alloc (| repeat (Value.Integer 0) 4 |))).
    
    Axiom AssociatedConstant_value_NONE :
      forall (T : Ty.t),
      M.IsAssociatedConstant (Self T) "value_NONE" (value_NONE T).
    
    (*     pub const SOME: [u8; 4] = [1, 0, 0, 0]; *)
    (* Ty.apply (Ty.path "array") [ Ty.path "u8" ] *)
    Definition value_SOME (T : Ty.t) : Value.t :=
      let Self : Ty.t := Self T in
      M.run
        ltac:(M.monadic (* thir failed to compile: Any { .. } *) (M.alloc (| Value.Tuple [] |))).
    
    Axiom AssociatedConstant_value_SOME :
      forall (T : Ty.t),
      M.IsAssociatedConstant (Self T) "value_SOME" (value_SOME T).
    
    (*
        pub fn none() -> Self {
            Self {
                option: Self::NONE,
                value: T::default(),
            }
        }
    *)
    Definition none (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match τ, α with
      | [], [] =>
        ltac:(M.monadic
          (Value.StructRecord
            "spl_token_2022::pod::PodCOption"
            [
              ("option", M.read (| M.get_constant (| "spl_token_2022::pod::NONE" |) |));
              ("value",
                M.call_closure (|
                  M.get_trait_method (| "core::default::Default", T, [], "default", [] |),
                  []
                |))
            ]))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_none :
      forall (T : Ty.t),
      M.IsAssociatedFunction (Self T) "none" (none T).
    
    (*
        pub const fn some(value: T) -> Self {
            Self {
                option: Self::SOME,
                value,
            }
        }
    *)
    Definition some (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match τ, α with
      | [], [ value ] =>
        ltac:(M.monadic
          (let value := M.alloc (| value |) in
          Value.StructRecord
            "spl_token_2022::pod::PodCOption"
            [
              ("option", M.read (| M.get_constant (| "spl_token_2022::pod::SOME" |) |));
              ("value", M.read (| value |))
            ]))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_some :
      forall (T : Ty.t),
      M.IsAssociatedFunction (Self T) "some" (some T).
    
    (*
        pub fn unwrap_or(self, default: T) -> T {
            if self.option == Self::NONE {
                default
            } else {
                self.value
            }
        }
    *)
    Definition unwrap_or (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match τ, α with
      | [], [ self; default ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let default := M.alloc (| default |) in
          M.read (|
            M.match_operator (|
              M.alloc (| Value.Tuple [] |),
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ :=
                      M.use
                        (M.alloc (|
                          M.call_closure (|
                            M.get_trait_method (|
                              "core::cmp::PartialEq",
                              Ty.apply (Ty.path "array") [ Ty.path "u8" ],
                              [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ],
                              "eq",
                              []
                            |),
                            [
                              M.SubPointer.get_struct_record_field (|
                                self,
                                "spl_token_2022::pod::PodCOption",
                                "option"
                              |);
                              M.get_constant (| "spl_token_2022::pod::NONE" |)
                            ]
                          |)
                        |)) in
                    let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                    default));
                fun γ =>
                  ltac:(M.monadic
                    (M.SubPointer.get_struct_record_field (|
                      self,
                      "spl_token_2022::pod::PodCOption",
                      "value"
                    |)))
              ]
            |)
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_unwrap_or :
      forall (T : Ty.t),
      M.IsAssociatedFunction (Self T) "unwrap_or" (unwrap_or T).
    
    (*
        pub fn is_some(&self) -> bool {
            self.option == Self::SOME
        }
    *)
    Definition is_some (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match τ, α with
      | [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::cmp::PartialEq",
              Ty.apply (Ty.path "array") [ Ty.path "u8" ],
              [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ],
              "eq",
              []
            |),
            [
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "spl_token_2022::pod::PodCOption",
                "option"
              |);
              M.get_constant (| "spl_token_2022::pod::SOME" |)
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_is_some :
      forall (T : Ty.t),
      M.IsAssociatedFunction (Self T) "is_some" (is_some T).
    
    (*
        pub fn is_none(&self) -> bool {
            self.option == Self::NONE
        }
    *)
    Definition is_none (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match τ, α with
      | [], [ self ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          M.call_closure (|
            M.get_trait_method (|
              "core::cmp::PartialEq",
              Ty.apply (Ty.path "array") [ Ty.path "u8" ],
              [ Ty.apply (Ty.path "array") [ Ty.path "u8" ] ],
              "eq",
              []
            |),
            [
              M.SubPointer.get_struct_record_field (|
                M.read (| self |),
                "spl_token_2022::pod::PodCOption",
                "option"
              |);
              M.get_constant (| "spl_token_2022::pod::NONE" |)
            ]
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_is_none :
      forall (T : Ty.t),
      M.IsAssociatedFunction (Self T) "is_none" (is_none T).
    
    (*
        pub fn ok_or<E>(self, error: E) -> Result<T, E> {
            match self {
                Self {
                    option: Self::SOME,
                    value,
                } => Ok(value),
                _ => Err(error),
            }
        }
    *)
    Definition ok_or (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match τ, α with
      | [ E ], [ self; error ] =>
        ltac:(M.monadic
          (let self := M.alloc (| self |) in
          let error := M.alloc (| error |) in
          M.read (|
            M.match_operator (|
              self,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "spl_token_2022::pod::PodCOption",
                        "option"
                      |) in
                    let γ0_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "spl_token_2022::pod::PodCOption",
                        "value"
                      |) in
                    let γ1_0 := M.SubPointer.get_slice_index (| γ0_0, 0 |) in
                    let γ1_1 := M.SubPointer.get_slice_index (| γ0_0, 1 |) in
                    let γ1_2 := M.SubPointer.get_slice_index (| γ0_0, 2 |) in
                    let γ1_3 := M.SubPointer.get_slice_index (| γ0_0, 3 |) in
                    let _ :=
                      M.is_constant_or_break_match (| M.read (| γ1_0 |), Value.Integer 1 |) in
                    let _ :=
                      M.is_constant_or_break_match (| M.read (| γ1_1 |), Value.Integer 0 |) in
                    let _ :=
                      M.is_constant_or_break_match (| M.read (| γ1_2 |), Value.Integer 0 |) in
                    let _ :=
                      M.is_constant_or_break_match (| M.read (| γ1_3 |), Value.Integer 0 |) in
                    let value := M.copy (| γ0_1 |) in
                    M.alloc (|
                      Value.StructTuple "core::result::Result::Ok" [ M.read (| value |) ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (M.alloc (|
                      Value.StructTuple "core::result::Result::Err" [ M.read (| error |) ]
                    |)))
              ]
            |)
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom AssociatedFunction_ok_or :
      forall (T : Ty.t),
      M.IsAssociatedFunction (Self T) "ok_or" (ok_or T).
  End Impl_spl_token_2022_pod_PodCOption_T.
  
  Module Impl_core_convert_From_where_bytemuck_pod_Pod_T_where_core_default_Default_T_solana_program_program_option_COption_T_for_spl_token_2022_pod_PodCOption_T.
    Definition Self (T : Ty.t) : Ty.t := Ty.apply (Ty.path "spl_token_2022::pod::PodCOption") [ T ].
    
    (*
        fn from(opt: COption<T>) -> Self {
            match opt {
                COption::None => Self {
                    option: Self::NONE,
                    value: T::default(),
                },
                COption::Some(v) => Self {
                    option: Self::SOME,
                    value: v,
                },
            }
        }
    *)
    Definition from (T : Ty.t) (τ : list Ty.t) (α : list Value.t) : M :=
      let Self : Ty.t := Self T in
      match τ, α with
      | [], [ opt ] =>
        ltac:(M.monadic
          (let opt := M.alloc (| opt |) in
          M.read (|
            M.match_operator (|
              opt,
              [
                fun γ =>
                  ltac:(M.monadic
                    (M.alloc (|
                      Value.StructRecord
                        "spl_token_2022::pod::PodCOption"
                        [
                          ("option", M.read (| M.get_constant (| "spl_token_2022::pod::NONE" |) |));
                          ("value",
                            M.call_closure (|
                              M.get_trait_method (|
                                "core::default::Default",
                                T,
                                [],
                                "default",
                                []
                              |),
                              []
                            |))
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 :=
                      M.SubPointer.get_struct_tuple_field (|
                        γ,
                        "solana_program::program_option::COption::Some",
                        0
                      |) in
                    let v := M.copy (| γ0_0 |) in
                    M.alloc (|
                      Value.StructRecord
                        "spl_token_2022::pod::PodCOption"
                        [
                          ("option", M.read (| M.get_constant (| "spl_token_2022::pod::SOME" |) |));
                          ("value", M.read (| v |))
                        ]
                    |)))
              ]
            |)
          |)))
      | _, _ => M.impossible
      end.
    
    Axiom Implements :
      forall (T : Ty.t),
      M.IsTraitInstance
        "core::convert::From"
        (Self T)
        (* Trait polymorphic types *)
        [ (* T *) Ty.apply (Ty.path "solana_program::program_option::COption") [ T ] ]
        (* Instance *) [ ("from", InstanceField.Method (from T)) ].
  End Impl_core_convert_From_where_bytemuck_pod_Pod_T_where_core_default_Default_T_solana_program_program_option_COption_T_for_spl_token_2022_pod_PodCOption_T.
  
  Module Impl_core_convert_TryFrom_spl_token_2022_pod_PodCOption_solana_program_pubkey_Pubkey_for_spl_pod_optional_keys_OptionalNonZeroPubkey.
    Definition Self : Ty.t := Ty.path "spl_pod::optional_keys::OptionalNonZeroPubkey".
    
    (*     type Error = ProgramError; *)
    Definition _Error : Ty.t := Ty.path "solana_program::program_error::ProgramError".
    
    (*
        fn try_from(p: PodCOption<Pubkey>) -> Result<Self, Self::Error> {
            match p {
                PodCOption {
                    option: PodCOption::<Pubkey>::SOME,
                    value,
                } if value == Pubkey::default() => Err(ProgramError::InvalidArgument),
                PodCOption {
                    option: PodCOption::<Pubkey>::SOME,
                    value,
                } => Ok(Self(value)),
                PodCOption {
                    option: PodCOption::<Pubkey>::NONE,
                    value: _,
                } => Ok(Self(Pubkey::default())),
                _ => unreachable!(),
            }
        }
    *)
    Definition try_from (τ : list Ty.t) (α : list Value.t) : M :=
      match τ, α with
      | [], [ p ] =>
        ltac:(M.monadic
          (let p := M.alloc (| p |) in
          M.read (|
            M.match_operator (|
              p,
              [
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "spl_token_2022::pod::PodCOption",
                        "option"
                      |) in
                    let γ0_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "spl_token_2022::pod::PodCOption",
                        "value"
                      |) in
                    let γ1_0 := M.SubPointer.get_slice_index (| γ0_0, 0 |) in
                    let γ1_1 := M.SubPointer.get_slice_index (| γ0_0, 1 |) in
                    let γ1_2 := M.SubPointer.get_slice_index (| γ0_0, 2 |) in
                    let γ1_3 := M.SubPointer.get_slice_index (| γ0_0, 3 |) in
                    let _ :=
                      M.is_constant_or_break_match (| M.read (| γ1_0 |), Value.Integer 1 |) in
                    let _ :=
                      M.is_constant_or_break_match (| M.read (| γ1_1 |), Value.Integer 0 |) in
                    let _ :=
                      M.is_constant_or_break_match (| M.read (| γ1_2 |), Value.Integer 0 |) in
                    let _ :=
                      M.is_constant_or_break_match (| M.read (| γ1_3 |), Value.Integer 0 |) in
                    let value := M.copy (| γ0_1 |) in
                    let γ :=
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::cmp::PartialEq",
                            Ty.path "solana_program::pubkey::Pubkey",
                            [ Ty.path "solana_program::pubkey::Pubkey" ],
                            "eq",
                            []
                          |),
                          [
                            value;
                            M.alloc (|
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::default::Default",
                                  Ty.path "solana_program::pubkey::Pubkey",
                                  [],
                                  "default",
                                  []
                                |),
                                []
                              |)
                            |)
                          ]
                        |)
                      |) in
                    let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Err"
                        [
                          Value.StructTuple
                            "solana_program::program_error::ProgramError::InvalidArgument"
                            []
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "spl_token_2022::pod::PodCOption",
                        "option"
                      |) in
                    let γ0_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "spl_token_2022::pod::PodCOption",
                        "value"
                      |) in
                    let γ1_0 := M.SubPointer.get_slice_index (| γ0_0, 0 |) in
                    let γ1_1 := M.SubPointer.get_slice_index (| γ0_0, 1 |) in
                    let γ1_2 := M.SubPointer.get_slice_index (| γ0_0, 2 |) in
                    let γ1_3 := M.SubPointer.get_slice_index (| γ0_0, 3 |) in
                    let _ :=
                      M.is_constant_or_break_match (| M.read (| γ1_0 |), Value.Integer 1 |) in
                    let _ :=
                      M.is_constant_or_break_match (| M.read (| γ1_1 |), Value.Integer 0 |) in
                    let _ :=
                      M.is_constant_or_break_match (| M.read (| γ1_2 |), Value.Integer 0 |) in
                    let _ :=
                      M.is_constant_or_break_match (| M.read (| γ1_3 |), Value.Integer 0 |) in
                    let value := M.copy (| γ0_1 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_pod::optional_keys::OptionalNonZeroPubkey"
                            [ M.read (| value |) ]
                        ]
                    |)));
                fun γ =>
                  ltac:(M.monadic
                    (let γ0_0 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "spl_token_2022::pod::PodCOption",
                        "option"
                      |) in
                    let γ0_1 :=
                      M.SubPointer.get_struct_record_field (|
                        γ,
                        "spl_token_2022::pod::PodCOption",
                        "value"
                      |) in
                    let γ1_0 := M.SubPointer.get_slice_index (| γ0_0, 0 |) in
                    let γ1_1 := M.SubPointer.get_slice_index (| γ0_0, 1 |) in
                    let γ1_2 := M.SubPointer.get_slice_index (| γ0_0, 2 |) in
                    let γ1_3 := M.SubPointer.get_slice_index (| γ0_0, 3 |) in
                    let _ :=
                      M.is_constant_or_break_match (| M.read (| γ1_0 |), Value.Integer 0 |) in
                    let _ :=
                      M.is_constant_or_break_match (| M.read (| γ1_1 |), Value.Integer 0 |) in
                    let _ :=
                      M.is_constant_or_break_match (| M.read (| γ1_2 |), Value.Integer 0 |) in
                    let _ :=
                      M.is_constant_or_break_match (| M.read (| γ1_3 |), Value.Integer 0 |) in
                    M.alloc (|
                      Value.StructTuple
                        "core::result::Result::Ok"
                        [
                          Value.StructTuple
                            "spl_pod::optional_keys::OptionalNonZeroPubkey"
                            [
                              M.call_closure (|
                                M.get_trait_method (|
                                  "core::default::Default",
                                  Ty.path "solana_program::pubkey::Pubkey",
                                  [],
                                  "default",
                                  []
                                |),
                                []
                              |)
                            ]
                        ]
                    |)));
                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
      end.
    
    Axiom Implements :
      M.IsTraitInstance
        "core::convert::TryFrom"
        Self
        (* Trait polymorphic types *)
        [
          (* T *)
          Ty.apply
            (Ty.path "spl_token_2022::pod::PodCOption")
            [ Ty.path "solana_program::pubkey::Pubkey" ]
        ]
        (* Instance *)
        [ ("Error", InstanceField.Ty _Error); ("try_from", InstanceField.Method try_from) ].
  End Impl_core_convert_TryFrom_spl_token_2022_pod_PodCOption_solana_program_pubkey_Pubkey_for_spl_pod_optional_keys_OptionalNonZeroPubkey.
End pod.
