[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wikichanges] Wiki page BPFK Section: MEX changed by RossOgilvie



The page BPFK Section: MEX was changed by RossOgilvie at 21:53 EDT
Comment: Issue was partly off topic.

You can view the page by following this link:
 
http://www.lojban.org/tiki/BPFK%20Section%3A%20MEX

You can view a diff back to the previous version by following this link: 
http://www.lojban.org/tiki/tiki-pagehistory.php?page=BPFK%20Section%3A%20MEX&compare=1&oldver=79&newver=80


***********************************************************
The changes in this version follow below, followed after by the current full page text.
***********************************************************


+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -Lines: 47-53 changed to +Lines: 47-52 @@
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

!!! Issues
- It seems quite arbitrary that operators acting in reverse polish notation are required to have exactly 2 operands. Especially considering that in polish notation, operators are allowed to have as many operands as they like. It does not make semantic sense for all operators (for example the negation operator, used in the example usage above) Though there is a problem in determining which operands belong to which operator, and the solution currently is quite elegant for usage, it lacks symmetry with forethought equivalent and seems contrived. I'm working on a better way, talk to me if you're interested in this problem. .i pe'i lo du'u va'o lo fu'a zei mekso lo meksu'i be lo cmavo be zo vu'u cu remei cu na'e nutli .i ganai do se cinri gi ko tavla mi
+ It seems quite arbitrary that operators acting in reverse polish notation are required to have exactly 2 operands. Especially considering that in polish notation, operators are allowed to have as many operands as they like. It does not make semantic sense for all operators (for example the negation operator, used in the example usage above). Though there is a problem in determining which operands belong to which operator, and the solution currently is quite elegant for usage, it lacks symmetry with forethought equivalent and seems arbitrary.

- (mi'e Ross Ogilvie, 15/5/10)
{BOX}





***********************************************************
The new page content follows below.
***********************************************************

! Proposed Definitions And Examples



{BOX()}

!! bi'e (BIhE)



!!! Proposed Definition

Indicates an operator has precedence over unmarked operators. When an operator is prefixed with this cmavo, it becomes automatically of higher precedence than other operators not so prefixed. If more than one operator has a ''bi'e'' prefix, grouping is to the right; multiple ''bi'e'' prefixes on a single operator are not allowed.  



!!! Proposed Keywords

* High priority operator

* Precedence operator



!!! Usage Examples

;li ci su'i vo bi'e pi'i mu du li reci:3 + (4 × 5) = 23 (CLL, 18.5.9)



!!! Notes

This is distinct from the use of mathematical brackets {vei} and {ve'o}.



!!! Issues

Xorxes has a plan to replace this by expanding the use of {bo} 

{BOX}



%%%

%%%

%%%



{BOX()}

!! fu'a (FUhA)



!!! Proposed Definition

Marks the mekso expression as using Reverse Polish (RP) notation. RP notation is always marked by an explicit ''fu'a'' at the beginning of the expression. Operators acting in RP are required to have two operands (though {tu'o} and {ge'a} can assist when using unitary and ternary operators respectively).



!!! Proposed Keywords

* Reverse Polish Flag



!!! See also

* {pe'o} Forethought operator flag

* {tu'o} Null operand

* {ge'a} Null operator



!!! Usage Examples

(natural example: doi jbokaj li fu'a pa boi re su'i ci su'i)%%%

;li fu'a reboi ci su'i du li mu: (RP) (2 3 +) = 5 (CLL, 18.16.1)

;li fu'a reboi ci pi'i voboi mu pi'i su'i du li rexa: (RP) (2 3 x) (4 5 x) + = 26 (CLL, 18.16.2)

;li fu'a ciboi muboi vu'u du li fu'a reboi tu'o va'a: (RP) (3 5 -) = (RP) (2 ''null'') ''negative'' (CLL, 18.16.3)

;li cinoki'oki'o du li fu'a biboi ciboi panoboi ge'a gei: 30,000,000 = (RP) 8 (3 10 ''null'') ''exp'' (CLL, 18.16.4)



!!! Issues

It seems quite arbitrary that operators acting in reverse polish notation are required to have exactly 2 operands. Especially considering that in polish notation, operators are allowed to have as many operands as they like. It does not make semantic sense for all operators (for example the negation operator, used in the example usage above). Though there is a problem in determining which operands belong to which operator, and the solution currently is quite elegant for usage, it lacks symmetry with forethought equivalent and seems arbitrary.



{BOX}



%%%

%%%

%%%



{BOX()}

!! jo'i (JOhI)



!!! Proposed Definition

Joins a sequence of simple operands or bracketed full expressions into a vector. A vector may have any number of components. It's corresponding terminator {te'u} is elidable.



!!! Proposed Keywords

* Vector flag



!!! See also

* {te'u} Mekso terminator for NAhU, NIhE, MOhE, MAhO, and JOhI



!!! Usage Examples

;li jo'i paboi reboi te'u su'i jo'i ciboi voboi du li jo'i voboi xaboi: ''vector'' (1, 2) + ''vector'' (3, 4) = ''vector'' (4, 6) (CLL, 18.15.1)



;li ma'o fy. boi pa jo'i re jo'i ci: f(1,[2,[3]])   (Re: ~91~lojban~93~ loi preti be fi lo nincli zo'u tu'e, Thu, 23 Jan 2003 11:10:25 -0800, Robin Lee Powell, [http://www.lojban.org/eo/lists/lojban-list/msg03809.html|link])



!!! Notes

It is the only member of selma'o JOhI

{BOX}



%%%

%%%

%%%



{BOX()}

!! ku'e (KUhE)



!!! Proposed Definition

This is the elidable terminator of operators when they are acting in forethought mode. It serves to distinguish where the operands of one operator end and another begin.



!!! Proposed Keywords

* Forethought operator terminator



!!! See Also

* {pe'o} Forethought operator flag



!!! Usage Examples

;li py. su'i va'a ny. ku'e su'i zy du li xy.: p + (''negative'' n) + z = x (CLL, 18.6.2)

{BOX}



%%%

%%%

%%%



{BOX()}

!! ma'o (MAhO)



!!! Proposed Defintion

This flag converts letteral string or other mathematical expression (mex) operand into a mex operator. Its elidable terminator is {te'u}.



!!! Proposed Keywords

* Operand to Operator flag



!!! Usage Examples

;li zy du li ma'o fy.boi xy.: z = f(x) (CLL, 18.6.3)



!!! Notes

The CLL has the following observation: There is a potential semantic ambiguity in ''ma'o fy. ~91~te'u~93~'' if ''fy.'' is already in use as a variable: it comes to mean "the function whose value is always 'f' ". However, mathematicians do not normally use the same lerfu words or strings as both functions and variables, so this case should not arise in practice.

{BOX}



%%%

%%%

%%%



{BOX()}

!! mo'e (MOhE)



!!! Proposed Definition

Converts a sumti to a mex operand. Intended to allow dimensions to be embedding into mex expressions. It is also used for "folk quantifiers", also known as collective nouns. It precedes the sumti. Its elidible terminator is {te'u}.



!!! See Also

* {na'u} Selbri to operator

* {ni'e} Selbri to operand



!!! Proposed Keywords

* Sumti to mex operand



!!! Usage Examples

;li mo'e re ratcu su'i mo'e re ractu du li mo'e vo danlu: (2 rats) + (2 rats) = (4 animals)   (CLL, 18.18.3)

;mi viska vei mo'e lo'e lanzu ve'o cinfo: I see (a typical family) of lions   (CLL, 18.18.4)

;:I see a pride of lions

;li mo'e lo spaji su'i mo'e lo spaji du li mo'e lo mutce spaji: A suprise + a suprise = a big suprise    (Re: mo'e (was: RE: ~91~lojban~93~ useless selmaho?, Sun, 2 Sep 2001 03:19:28 +0200, Adam Raizen, [http://www.lojban.org/sv/lists/lojban-list/msg21261.html|link])



{BOX}



%%%

%%%

%%%



{BOX()}

!! na'u (NAhU)



!!! Proposed Definition

The cmavo "na'u" makes a selbri into an operator. In general, the first place of the selbri specifies the result of the operator, and the other unfilled places specify the operands. Its elidible terminator is {te'u}. It is also used to construct questions about operators.



!!! See Also



* {ni'e} selbri to operand

* {mo'e} sumti to operand

* {te'u} terminator



!!! Proposed Keywords



* selbri to operator



!!! Usage Examples



;li na'u tanjo te'u vei pai fe'i vo ~91~ve'o~93~ du li pa : tan ( pi / 4 ) = 1 (similar to CLL, 18.18.1)

;li re na'u mo re du li vo: 2 what-operator? 2 = 4 (CLL, 18.19.4)

;.i go li cy. na'u klesi .abu lo'o.eli cy. na'u klesi by. jetnu gi cy. kampu klesi .abu joi by:If C ''subset'' A and C ''subset'' B, then C is called a common subset of A and B. (Fundamental Concepts Of Higher Algebra, Translation by Nick Nicholas, [http://www.lojban.org/cgi-bin/corpus/show/Fundamental%20Concepts%20Of%20Higher%20Algebra|link] )

'

!!! Notes

This comment applies exclusively to CLL example 18.18.1. I'm not sure if it therefore belongs here. The CLL example of this seems to be needlessly complicated (using the value of pi/2 where the function is undefined). I've changed the example here slightly to avoid any disputes about validity.

{BOX}



%%%

%%%

%%%





{BOX()}

!! ni'e (NIhE)



!!! Proposed Definition

The cmavo "ni'e" makes a selbri into an operand. The x1 place of the selbri generally represents a number, and therefore is often a ``ni'' abstraction. The "ni'e" makes that number available as a mekso operand. A common application is to make equations relating pure dimensions.



!!! Proposed Keywords

* selbri to operand



!!! See Also

* {na'u} selbri to operator

* {mo'e} sumti to operand



!!! Usage Examples

;li ni'e ni clani ~91~te'u~93~ pi'i ni'e ni ganra ~91~te'u~93~ pi'i ni'e ni condi te'u du li ni'e ni canlu: Length x Width x Depth = Volume (CLL 18.18.2)

;ibabo le jinga korbi goi jyky cu du le cmarai mulna'u poi zmadu li ni'e ni ce'u cuxna fe'i ni'e zmarai ni cumki jinga: A winning threshold is determined as follows: divide the number of voters by the maximum number of slots to fill, and take the lowest integer larger than this number. (Single Transferrable Vote, pycyn?, Saturday 21/6/2003 22:48:27 UTC?, [http://www.lojban.org/tiki/Single+Transferrable+Vote|link])



{BOX}

%%%

%%%

%%%



{BOX()}

!! nu'a (NUhA)



!!! Proposed Definition

The cmavo "nu'a" is the inverse of {na'u}, and allows a mekso operator to be used as a normal selbri, with the first place being the result of applying the operator to the other places. 



!!! See Also



* {na'u} selbri to operator

* {me} sumti to selbri



!!! Proposed Keywords



* operator to selbri



!!! Usage Examples

;li ni'umu cu nu'a va'a li ma'umu: -5 is the negative of +5 (CLL, 18.19.3)



!!! Issues

It's been pointed out by Xorxes that {me} could be expanded to do this. {nu'a} could be moved to ME for backwards compatibility. It has had (almost) no usage in the wild (corpora + mailing list) (literally 6 mentions on IRC). But it does have a nice symmetry with na'u

{BOX}



%%%

%%%

%%%



{BOX()}

!! pe'o (PEhO)



!!! Proposed Definition

The optional flag that indicates a forethought mekso operator. Forethought mode is also known as Polish notation. When used in conjunction with {ku'e}, it acts like brackets around the function and its arguments.



!!! See Also

* {fu'a} Reverse Polish flag

* {ku'e} Forethought operator terminator



!!! Proposed Keywords

* Forethought Flag



!!! Usage Examples

;li pe'o su'i paboi reboi ciboi ku'e du li xa: (+ 1 2 3 ) = 6   (CLL 18.6.4)

;li py. su'i pe'o va'a ny. ku'e su'i zy du li xy.: p + ( -n) + z = x   (CLL 18.6.5)

;li zy du li pe'o ma'o fy.boi xy. ku'e: z = ( f(x) )   (CLL 18.6.6)



!!! Notes

When using forethought mekso, be sure that the operands really are operands: they cannot contain regular infix expressions unless parenthesized with {vei} and {ve'o}. Eg li + 2 x 3 4 parses as 2 + ( 3 x 4 ) and not ( 2 x 3 ) + 4.

{BOX}

%%%

%%%

%%%



{BOX()}

!! ti'o (SEI)



!!! Proposed Definition

This, like {sei}, attaches a commentary about the text. The purpose of this is to define a heirarchy of precedence for mex operators. 

%%%

The format of a {ti'o} declaration has not been formally established, but presumably would take the form of mentioning a mekso operator and then giving it either an absolute numerical precedence on some pre-established scale, or else specifying relative precedences between new operators and existing operators. Typically only operators of selma'o VUhU would be given higher precedence, whereas operators created with {na'u}, {ni'e} or {ma'o} would remain at the lowest level of precedence. 

%%%

If such a system was created, there would most likely be a predefined set of precedence levels that would match common mathematics conventions and which could easily be referenced. In such a system one would expect that multiplication would be of higher precedence than addition



!!! Proposed Keywords

* Metalinguistic Operator Precedence Declaration

* Mex precedence



!!! Usage Examples

;ti'o zo pi'i ce'o zo su'i porsi li pa su'i re pi'i ci du li ze: ("x" and "+" is an ordered sequence) 1 + 2 x 3 = 7 (created for this, mi'e RossOgilvie, 16/6/10)



!!! Issues

This isn't really a definition; more a suggestion of what the intention of this cmavo should be. A good system needs to be worked out. I could find no mention of it in the mailing list.



{BOX}



%%%

%%%

%%%



{BOX()}

!! te'u (TEhU)



!!! Proposed Definition

An elidable terminator for several mex related {selma'o}, namely NAhU, NIhE, MOhE, MAhO, and JOhI. These {selma'o} are generally conversion tags.



!!! See Also



* {na'u}

* {ni'e}

* {mo'e}

* {ma'o}

* {jo'i}



!!! Proposed Keywords



* Mex Conversion Terminator



!!! Usage Examples



;li jo'i paboi reboi te'u su'i jo'i ciboi voboi du li jo'i voboi xaboi: the-number array( one, two ) plus array( three, four) equals the-number array( four, six)  (CLL 18.15.1)

;li na'u tanjo te'u vei pai fe'i vo ~91~ve'o~93~ du li pa: the-number the-operator tangent( pi / 4 ) = the-number 1   (CLL 18.18.1)

;li ni'e ni clani ~91~te'u~93~ pi'i ni'e ni ganra ~91~te'u~93~ pi'i ni'e ni condi te'u du li ni'e ni canlu:Length × Width × Depth = Volume   (CLL 18.18.2)

{BOX}

%%%

%%%

%%%



{BOX()}

!! vei (VEI)



!!! Proposed Definition

This is the mathematical left bracket. Used to group mex expressions. For example, brackets are used to turn a mex expression into an operand for use by a forethought operator, or to place a mex expression in a subscript. The right bracket {ve'o} is elidable. {vei} and {ve'o} are necessary for any non-simple mekso used as a quantifier.



!!! See Also



* {ve'o} Right bracket

* {ku'e} Forethought operator teminator



!!! Proposed Keywords



* Left bracket



!!! Usage Examples



;li vei ny. su'i pa ve'o pi'i vei ny. su'i pa ~91~ve'o~93~ du li ny. ~91~bi'e~93~ te'a re su'i re bi'e pi'i ny. su'i pa: (n+1)(n+1) = n~94~2 + 2n + 1   (CLL 18.5.10)

;xy.boixi vei ny. su'i pa ~91~ve'o~93~: x sub ( n + 1)   (CLL 18.13.4)

;vei ci .a vo ve'o prenu cu klama le zarci: ( three or four ) people go-to the market.   (CLL 18.17.1)

{BOX}

%%%

%%%

%%%

{BOX()}

!! ve'o (VEhO)



!!! Proposed Definition

This is the mathematical right bracket. Used to group mex expressions. For example, brackets are used to turn a mex expression into an operand for use by a forethought operator, or to place a mex expression in a subscript. As a terminator, it is elidable. The corresponding left bracket is {vei}. {vei} and {ve'o} are necessary for any non-simple mekso used as a quantifier.



!!! See Also



* {vei} Left bracket

* {tu'e} Mex Conversion Terminator



!!! Proposed Keywords



* Right bracket



!!! Usage Examples



;li vei ny. su'i pa ve'o pi'i vei ny. su'i pa ~91~ve'o~93~ du li ny. ~91~bi'e~93~ te'a re su'i re bi'e pi'i ny. su'i pa: (n+1)(n+1) = n~94~2 + 2n + 1 (CLL 18.5.10)

;xy.boixi vei ny. su'i pa ~91~ve'o~93~: x sub ( n + 1) (CLL 18.13.4)

;vei ci .a vo ve'o prenu cu klama le zarci: ( three or four ) people go-to the market. (CLL 18.17.1)

{BOX}

! Issues

The write up above pretty much follows the CLL. However there has been at least one [http://www.lojban.org/tiki/MEX+grammar+proposal|proposal] (and I suspect there might be others) to reform the mex grammar to simplify it, mostly by merging selma'o. I myself am unhappy by the complexity of mex; specifically the limitations of {fu'a}, and the current uses of {tu'o} and {ge'a} (as noted above).



Also, the definition of {ti'o} is almost apologetic in its uselessness. As the CLL suggests, a working party needs to hammer out a standardised format for {ti'o}, put together a common convention precedence list for VUhU and publish it for reference. (In fact if such a list were published, then perhaps it should apply by default. The CLL suggests that the common convention for order of operations applies in mex already, and that would provide a sound way to implement this)



! Impact

There is little impact from this, as mex is so underused. The only substantial work involving mex that I could find was [http://www.lojban.org/cgi-bin/corpus/show/Fundamental%20Concepts%20Of%20Higher%20Algebra|

Fundamental Concepts Of Higher Algebra], by Nick Nicholas. Regardless, there is no recommendation to change the CLL definitions.






_______________________________________________
Wikichanges mailing list
Wikichanges@lojban.org
http://mail.lojban.org/mailman/listinfo/wikichanges