I\'ve been doing some OCaml programming lately to learn the language and to get more acquainted with functional programming. Recently, I\'ve started to think that I\'d like
As you yourself correctly surmise, this is not possible in algebraic types. I agree with Apocalisp's suggestion that you may simply wrap the "inherited" part of nbexp in a constructor of its own.
I would add that the lack of inheritance of algebraic types is part of their wonderfulness. This means that an expression such as And(foo, bar) is umambiguously typed, and that casting (either up or down) has no role to play in the type system. This yields both greater safety and greater clarity. It does of course require of the programmer that s/he explicitly handle the cases where s/he wants to interact with the bexp parts of nbexp, but if you think about it, that's how the increased safety and clarity is realised in practice.