Identity element: Difference between revisions

Jump to navigation Jump to search
627 bytes added ,  20:58, 24 November 2019
→‎Left and right identities: Prove left and right identities can't be distinct
(Mistake in ~)
(→‎Left and right identities: Prove left and right identities can't be distinct)
Line 4: Line 4:


Since the identity element preserves the ''other'' argument, it can be a left and/or a right identity. For example, [[Add]] (<source lang=apl inline>+</source>) has the left and right identity element <source lang=apl inline>0</source> because <source lang=apl inline>N≡N+0</source> and <source lang=apl inline>N≡0+N</source> for all arrays <source lang=apl inline>N</source> in the domain of <source lang=apl inline>+</source>. However, the identity of [[Divide]] (<source lang=apl inline>÷</source>), <source lang=apl inline>1</source>, is only a right identity because while <source lang=apl inline>N≡N÷1</source> is true for all <source lang=apl inline>N</source> in the domain of <source lang=apl inline>÷</source>, this isn't so for <source lang=apl inline>N≡1÷N</source>, and no alternative identity element value exists which would fulfil the condition.
Since the identity element preserves the ''other'' argument, it can be a left and/or a right identity. For example, [[Add]] (<source lang=apl inline>+</source>) has the left and right identity element <source lang=apl inline>0</source> because <source lang=apl inline>N≡N+0</source> and <source lang=apl inline>N≡0+N</source> for all arrays <source lang=apl inline>N</source> in the domain of <source lang=apl inline>+</source>. However, the identity of [[Divide]] (<source lang=apl inline>÷</source>), <source lang=apl inline>1</source>, is only a right identity because while <source lang=apl inline>N≡N÷1</source> is true for all <source lang=apl inline>N</source> in the domain of <source lang=apl inline>÷</source>, this isn't so for <source lang=apl inline>N≡1÷N</source>, and no alternative identity element value exists which would fulfil the condition.
If a function <source lang=apl inline>f</source> has both a left identity element and a right identity element (call them <source lang=apl inline>l</source> and <source lang=apl inline>r</source>), then they must be the same. This is because <source lang=apl inline>l f r</source> {{←→}} <source lang=apl inline>r</source>, since <source lang=apl inline>l</source> is a left identity, and <source lang=apl inline>l f r</source> {{←→}} <source lang=apl inline>l</source>, since <source lang=apl inline>r</source> is a right identity, so <source lang=apl inline>l</source> {{←→}} <source lang=apl inline>r</source>.


== Reduction over a length-0 axis ==
== Reduction over a length-0 axis ==

Navigation menu